-
Notifications
You must be signed in to change notification settings - Fork 24
/
about.pas
74 lines (56 loc) · 1.27 KB
/
about.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
unit About;
{$mode objfpc}{$H+}
interface
uses
LResources, Forms, ExtCtrls, StdCtrls, LCLIntf;
type
{ TAboutForm }
TAboutForm = class(TForm)
Button1: TButton;
Image1: TImage;
TitleLbl: TLabel;
TextLbl: TLabel;
UrlLbl: TLabel;
procedure Exit(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: char);
procedure GotoUrl(Sender: TObject);
procedure ShowAboutForm(Sender: TObject);
procedure CloseForm();
private
{ private declarations }
public
{ public declarations }
end;
var
AboutForm: TAboutForm;
implementation
{ TAboutForm }
const
URL = 'http://dan.hersam.com/software/snaptimer/';
procedure TAboutForm.ShowAboutForm(Sender: TObject);
const
VersionStr = {$I version.inc};
begin
TitleLbl.Caption := 'SnapTimer - Version ' + VersionStr;
TextLbl.Caption := 'Snapmagic Software' + sLineBreak + 'Written by Dan Hersam';
UrlLbl.Caption := URL;
end;
procedure TAboutForm.FormKeyPress(Sender: TObject; var Key: char);
begin
if key = #27 then CloseForm();
end;
procedure TAboutForm.GotoUrl(Sender: TObject);
begin
OpenURL(URL);
end;
procedure TAboutForm.Exit(Sender: TObject);
begin
CloseForm();
end;
procedure TAboutForm.CloseForm();
begin
Close;
end;
initialization
{$I about.lrs}
end.