forked from Ravie/quice
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathAbout.pas
114 lines (100 loc) · 2.96 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
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
{*******************************************************}
{ }
{ "About", version 2.0 }
{ }
{ Copyright (c) 2006-2008 "Indomit Soft" }
{ }
{ Original code is About.pas }
{ Created: Komin Mikhail }
{ Last updated: 29.01.2006 }
{ Modifed: Komin Mikhail }
{ }
{*******************************************************}
{ }
{ Äàííûé ìîäóëü ñîäåðæèò ôîðìó "Î ïðîãðàììå..." }
{ }
{*******************************************************}
{
var
F: TAboutBox;
begin
F:=TAboutBox.MyCreate(Self);
try
F.ShowModal;
finally
F.Free;
end;
end;
}
unit About;
interface
uses Windows, SysUtils, Forms, Classes, Graphics, Dialogs, Math,
Controls, StdCtrls, ExtCtrls, ActnList, ExtActns, Registry, JvExControls, JvPoweredBy,
System.Actions;
type
TAboutBox = class(TForm)
ActionList1: TActionList;
BrowseURL1: TBrowseURL;
Panel2: TPanel;
Bevel1: TBevel;
OKButton: TButton;
Panel1: TPanel;
lblVersion: TLabel;
lblAutorName: TLabel;
LinkSite: TLabel;
Image1: TImage;
edWebMoneyU: TEdit;
edWebMoneyE: TEdit;
edWebMoneyR: TEdit;
edWebMoneyZ: TEdit;
lbDesc: TLabel;
PayPal: TLabel;
BrowseURL2: TBrowseURL;
lbdbversion: TLabel;
Label1: TLabel;
JvPoweredByJVCL1: TJvPoweredByJVCL;
lbprojectwebsite: TLabel;
procedure FormShow(Sender: TObject);
procedure LinkSiteClick(Sender: TObject);
procedure PayPalClick(Sender: TObject);
private
procedure InitializeCaptions;
{ Private declarations }
public
dbversion: string;
constructor MyCreate (AOwner: TComponent);
{ Public declarations }
end;
implementation
uses StrUtils, Functions, MyDataModule;
{$R *.dfm}
procedure TAboutBox.InitializeCaptions;
var
Major, Minor, Release, Build: Word;
begin
// îïðåäåëåíèå âåðñèè
if GetFileVersion(Application.ExeName, Major, Minor, Release, Build) then
lblVersion.Caption:= Format('Version %d.%d.%d.%d',[Major, Minor, Release, Build])
else
lblVersion.Caption:='';
end;
procedure TAboutBox.FormShow(Sender: TObject);
begin
InitializeCaptions;
lbdbversion.Caption := dbversion;
end;
procedure TAboutBox.LinkSiteClick(Sender: TObject);
begin
BrowseURL1.URL:='https://github.com/Ravie/quice/releases';
BrowseURL1.Execute;
end;
constructor TAboutBox.MyCreate(AOwner: TComponent);
begin
inherited Create(AOwner);
end;
procedure TAboutBox.PayPalClick(Sender: TObject);
begin
BrowseURL2.URL:='http://sourceforge.net/donate/index.php?group_id=196709';
BrowseURL2.Execute;
end;
end.