-
Notifications
You must be signed in to change notification settings - Fork 1
/
about.pas
81 lines (63 loc) · 1.63 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
74
75
76
77
78
79
80
{****************************************************
Snap MD5
Copyright (C) 2011 - Dan Hersam http://dan.hersam.com
*****************************************************}
unit About;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
ExtCtrls, StdCtrls, LCLIntf;
type
{ TAboutForm }
TAboutForm = class(TForm)
Button1: TButton;
Image1: TImage;
TextLbl: TLabel;
TitleLbl: 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/snap-md5/';
AppTitle = 'Snap MD5';
procedure TAboutForm.ShowAboutForm(Sender: TObject);
const
VersionStr = {$I version.inc};
begin
TitleLbl.Caption := AppTitle + ' v' + 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
//ShellExecute(0, 'open', PChar(TLabel(Sender).Caption), nil, nil, SW_SHOWNORMAL);
OpenURL(PChar(TLabel(Sender).Caption));
end;
procedure TAboutForm.Exit(Sender: TObject);
begin
CloseForm();
end;
procedure TAboutForm.CloseForm();
begin
Close;
end;
initialization
{$I about.lrs}
end.