source: trunk/Packages/Common/Forms/FormAbout.pas

Last change on this file was 85, checked in by chronos, 7 months ago
  • Modified: Updated Common package.
File size: 1.6 KB
Line 
1unit FormAbout;
2
3interface
4
5uses
6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
7 StdCtrls, ExtCtrls, ApplicationInfo, Common, FormEx;
8
9type
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
32implementation
33
34{$R *.lfm}
35
36resourcestring
37 SVersion = 'Version';
38 SReleaseDate = 'Release date';
39 SLicense = 'License';
40
41{ TFormAbout }
42
43procedure TFormAbout.FormShow(Sender: TObject);
44begin
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;
55end;
56
57procedure TFormAbout.UpdateInterface;
58begin
59 ButtonHomePage.Enabled := Assigned(ApplicationInfo);
60end;
61
62procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
63begin
64 OpenWebPage(ApplicationInfo.HomePage);
65end;
66
67end.
Note: See TracBrowser for help on using the repository browser.