-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathClipSaveVersion.pas
More file actions
65 lines (53 loc) · 1.43 KB
/
ClipSaveVersion.pas
File metadata and controls
65 lines (53 loc) · 1.43 KB
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
unit ClipSaveVersion;
interface
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
Buttons, ExtCtrls, ShellAPI;
type
TVersionDlg = class(TForm)
OKBtn: TButton;
Label4: TLabel;
Panel1: TPanel;
URLLabel1: TLabel;
URLLabel2: TLabel;
Label5: TLabel;
Label6: TLabel;
Label3: TLabel;
Label1: TLabel;
Lbl_Version: TLabel;
Image1: TImage;
Image2: TImage;
procedure OKBtnClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure URLLabel1Click(Sender: TObject);
procedure URLLabel2Click(Sender: TObject);
private
{ Private 錾 }
public
{ Public 錾 }
end;
var
VersionDlg: TVersionDlg;
implementation
{$R *.DFM}
procedure TVersionDlg.OKBtnClick(Sender: TObject);
begin
Close;
end;
procedure TVersionDlg.FormCreate(Sender: TObject);
var
aVersion, MajorVersion, MinorVersion: Cardinal;
begin
aVersion := SysUtils.GetFileVersion(Application.ExeName);
MajorVersion := aVersion shr 16;
MinorVersion := aVersion and $FFFF;
Lbl_Version.Caption := Format('%d.%d', [MajorVersion, MinorVersion]);
end;
procedure TVersionDlg.URLLabel1Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'https://github.com/tomneko/ClipSave', nil, nil, SW_SHOWNORMAL);
end;
procedure TVersionDlg.URLLabel2Click(Sender: TObject);
begin
ShellExecute(Handle, 'open', 'https://github.com/tomneko/ClipSave/issues', nil, nil, SW_SHOWNORMAL);
end;
end.