1 | unit FormAbout;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
|
---|
7 | StdCtrls, ExtCtrls, ApplicationInfo, Common, FormEx;
|
---|
8 |
|
---|
9 | type
|
---|
10 | { TFormAbout }
|
---|
11 |
|
---|
12 | TFormAbout = class(TFormEx)
|
---|
13 | ButtonClose: TButton;
|
---|
14 | ButtonHomePage: TButton;
|
---|
15 | ImageLogo: TImage;
|
---|
16 | LabelAppName: TLabel;
|
---|
17 | LabelDescription: TLabel;
|
---|
18 | LabelContent: TLabel;
|
---|
19 | PanelTop: TPanel;
|
---|
20 | PanelButtons: TPanel;
|
---|
21 | procedure ButtonHomePageClick(Sender: TObject);
|
---|
22 | procedure FormShow(Sender: TObject);
|
---|
23 | private
|
---|
24 | FApplicationInfo: TApplicationInfo;
|
---|
25 | public
|
---|
26 | procedure UpdateInterface;
|
---|
27 | property ApplicationInfo: TApplicationInfo read FApplicationInfo write
|
---|
28 | FApplicationInfo;
|
---|
29 | end;
|
---|
30 |
|
---|
31 |
|
---|
32 | implementation
|
---|
33 |
|
---|
34 | {$R *.lfm}
|
---|
35 |
|
---|
36 | resourcestring
|
---|
37 | SVersion = 'Version';
|
---|
38 | SReleaseDate = 'Release date';
|
---|
39 | SLicense = 'License';
|
---|
40 |
|
---|
41 | { TFormAbout }
|
---|
42 |
|
---|
43 | procedure TFormAbout.FormShow(Sender: TObject);
|
---|
44 | begin
|
---|
45 | if Assigned(ApplicationInfo) then
|
---|
46 | with ApplicationInfo do begin
|
---|
47 | LabelAppName.Caption := AppName;
|
---|
48 | LabelContent.Caption := SVersion + ': ' + Version + LineEnding +
|
---|
49 | SReleaseDate + ': ' + DateToStr(ReleaseDate) + LineEnding +
|
---|
50 | SLicense + ': ' + License;
|
---|
51 | LabelDescription.Caption := Description;
|
---|
52 | ImageLogo.Picture.Bitmap.Assign(Icon);
|
---|
53 | end;
|
---|
54 | UpdateInterface;
|
---|
55 | end;
|
---|
56 |
|
---|
57 | procedure TFormAbout.UpdateInterface;
|
---|
58 | begin
|
---|
59 | ButtonHomePage.Enabled := Assigned(ApplicationInfo);
|
---|
60 | end;
|
---|
61 |
|
---|
62 | procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
|
---|
63 | begin
|
---|
64 | OpenWebPage(ApplicationInfo.HomePage);
|
---|
65 | end;
|
---|
66 |
|
---|
67 | end.
|
---|