-
Notifications
You must be signed in to change notification settings - Fork 1
/
unit2.pas
149 lines (104 loc) · 4.67 KB
/
unit2.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
unit Unit2;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, LCLIntf,
ExtCtrls;
type
{ TForm2 }
TForm2 = class(TForm)
Button1: TButton;
Button2: TButton;
Image1: TImage;
Image2: TImage;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure Image1Click(Sender: TObject);
procedure Image2Click(Sender: TObject);
procedure Label1Click(Sender: TObject);
procedure Label1MouseEnter(Sender: TObject);
procedure Label1MouseLeave(Sender: TObject);
private
public
end;
var
Form2: TForm2;
const LICENSE = 'ClipeXec is licensed under the' + LineEnding +
'GNU General Public License v3.0.' + LineEnding +
'You should have received a copy of the ' + LineEnding +
'GNU General Public License' + LineEnding +
'along with this program.' + LineEnding +
'If not, see https://www.gnu.org/licenses/'; //The String used for Displaying the License Information
const CHANGELOG = 'Version 1.0.0:' + LineEnding +
' * Initial Release.' + LineEnding +
'Version 1.0.1:' + LineEnding +
' * Added horizontal ScrollBar for large commands.' + LineEnding +
' * Added Copy Feature for single Clipboard Entries.' + LineEnding +
' * Added CMD Display Option with Confirmation upon Execution.' + LineEnding +
' * Added Clear Option for Clipboard after Execution.' + LineEnding +
' * Added About Page to display additional Information.' + LineEnding +
' * Added Display for amount of still running Tasks.' + LineEnding +
' * Added Confirmation Dialog for closing if Tasks are still running.' + LineEnding +
' * Added many visual Improvements to the GUI.' + LineEnding +
'Version 1.0.2:' + LineEnding +
' * Added Feature to save Settings.' + LineEnding +
' * Added Display for Working Directory in Window Title.' + LineEnding +
' * Changed GUI Layout.' + LineEnding +
' * Changed default Working Directory to Application Directory.' + LineEnding +
' * Minor Bug and Typo fixes.' + LineEnding +
'Version 1.0.3:' + LineEnding +
' * Minor Bug Fixes.' + LineEnding +
'Version 1.0.4:' + LineEnding +
' * Fixed Typo.'; //The String used for Displaying the latest Changelog
const REPO_CODEBERG = 'https://codeberg.org/EthernalStar/ClipeXec'; //Rpository Url for Codeberg
const REPO_GITHUB = 'https://github.com/EthernalStar/ClipeXec'; //Rpository Url for Github
const APP_TITLE = 'ClipeXec'; //Title of the Application
const APP_VERSION = '1.0.4'; //Version of the Application
const DEV_NAME = 'EthernalStar'; //Developer Name
const DEV_EMAIL = '[email protected]'; //Developer Email
implementation
{$R *.lfm}
{ TForm2 }
procedure TForm2.Label1MouseEnter(Sender: TObject); //Mouse enter Label
begin
Label1.Font.Style := [fsUnderline]; //Underline the Text
end;
procedure TForm2.Label1Click(Sender: TObject); //OnClick Event for the Email Label
begin
OpenUrl('mailto:' + DEV_EMAIL); //Open Email with mailto: Address
end;
procedure TForm2.Button1Click(Sender: TObject); //Changelog Button Press
begin
ShowMessage(CHANGELOG); //Display latest Changelog
end;
procedure TForm2.Button2Click(Sender: TObject); //License Button Press
begin
ShowMessage(LICENSE); //Display License Information
end;
procedure TForm2.FormCreate(Sender: TObject); //Form Creation Events
begin
Self.Caption := 'About ' + APP_TITLE; //Set Form Caption
Image1.Hint := 'Visit ' + REPO_CODEBERG; //Set Repo URL as Hint
Image2.Hint := 'Visit ' + REPO_GITHUB; //Set Repo URL as Hint
Label2.Caption := APP_TITLE + ' - Version ' + APP_VERSION; //Set App Title and Version
Label1.Caption := DEV_EMAIL; //Set Developer EMail
Label3.Caption := '©' + DEV_NAME; //Set Developer Name
end;
procedure TForm2.Image1Click(Sender: TObject); //Click Codeberg Repo Image
begin
OpenUrl(REPO_CODEBERG); //Open Repository URL
end;
procedure TForm2.Image2Click(Sender: TObject); //Click Github Repo Image
begin
OpenUrl(REPO_GITHUB); //Open Repository URL
end;
procedure TForm2.Label1MouseLeave(Sender: TObject); //Mouse Leave Label
begin
Label1.Font.Style := []; //Remove Underlining
end;
end.