1 | unit UFormAbout;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
|
---|
9 | StdCtrls, ExtCtrls, UApplicationInfo, UCommon, LCLIntf;
|
---|
10 |
|
---|
11 | type
|
---|
12 |
|
---|
13 | { TFormAbout }
|
---|
14 |
|
---|
15 | TFormAbout = class(TForm)
|
---|
16 | ButtonHomePage: TButton;
|
---|
17 | ButtonClose: TButton;
|
---|
18 | Image1: TImage;
|
---|
19 | LabelAppName: TLabel;
|
---|
20 | LabelDescription: TLabel;
|
---|
21 | LabelContent: TLabel;
|
---|
22 | Panel1: TPanel;
|
---|
23 | procedure ButtonHomePageClick(Sender: TObject);
|
---|
24 | procedure FormCreate(Sender: TObject);
|
---|
25 | procedure FormShow(Sender: TObject);
|
---|
26 | private
|
---|
27 | { private declarations }
|
---|
28 | public
|
---|
29 | ApplicationInfo: TApplicationInfo;
|
---|
30 | end;
|
---|
31 |
|
---|
32 | var
|
---|
33 | FormAbout: TFormAbout;
|
---|
34 |
|
---|
35 | implementation
|
---|
36 |
|
---|
37 | {$R *.lfm}
|
---|
38 |
|
---|
39 | uses
|
---|
40 | UCore;
|
---|
41 |
|
---|
42 | resourcestring
|
---|
43 | SVersion = 'Version';
|
---|
44 | SReleaseDate = 'Release date';
|
---|
45 | SLicense = 'License';
|
---|
46 |
|
---|
47 | { TFormAbout }
|
---|
48 |
|
---|
49 | procedure TFormAbout.FormShow(Sender: TObject);
|
---|
50 | begin
|
---|
51 | if Assigned(ApplicationInfo) then begin
|
---|
52 | LabelAppName.Caption := ApplicationInfo.AppName;
|
---|
53 | LabelDescription.Caption := ApplicationInfo.Description;
|
---|
54 | LabelDescription.AutoSize := True;
|
---|
55 | LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
|
---|
56 | SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
|
---|
57 | SLicense + ': ' + ApplicationInfo.License;
|
---|
58 | Image1.Picture.Bitmap.SetSize(Application.Icon.Width, Application.Icon.Height);
|
---|
59 | Image1.Picture.Bitmap.Assign(Application.Icon);
|
---|
60 | end;
|
---|
61 | end;
|
---|
62 |
|
---|
63 | procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
|
---|
64 | begin
|
---|
65 | if Assigned(ApplicationInfo) then
|
---|
66 | OpenURL(ApplicationInfo.HomePage);
|
---|
67 | end;
|
---|
68 |
|
---|
69 | procedure TFormAbout.FormCreate(Sender: TObject);
|
---|
70 | begin
|
---|
71 | Core.Translator1.TranslateComponentRecursive(Self);
|
---|
72 | Core.ThemeManager1.UseTheme(Self);
|
---|
73 | end;
|
---|
74 |
|
---|
75 | end.
|
---|
76 |
|
---|