source: tags/1.4.0/Forms/UFormAbout.pas

Last change on this file was 142, checked in by chronos, 7 years ago
  • Modified: About dialog with application icon.
File size: 1.4 KB
Line 
1unit UFormAbout;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
9 StdCtrls, ExtCtrls, UApplicationInfo, UCommon, LCLIntf;
10
11type
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
32var
33 FormAbout: TFormAbout;
34
35implementation
36
37{$R *.lfm}
38
39uses
40 UCore;
41
42resourcestring
43 SVersion = 'Version';
44 SReleaseDate = 'Release date';
45 SLicense = 'License';
46
47{ TFormAbout }
48
49procedure TFormAbout.FormShow(Sender: TObject);
50begin
51 if Assigned(ApplicationInfo) then begin
52 LabelAppName.Caption := ApplicationInfo.AppName;
53 LabelContent.Caption := SVersion + ': ' + ApplicationInfo.Version + LineEnding +
54 SReleaseDate + ': ' + DateToStr(ApplicationInfo.ReleaseDate) + LineEnding +
55 SLicense + ': ' + ApplicationInfo.License;
56 end;
57end;
58
59procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
60begin
61 if Assigned(ApplicationInfo) then
62 OpenURL(ApplicationInfo.HomePage);
63end;
64
65procedure TFormAbout.FormCreate(Sender: TObject);
66begin
67 Core.CoolTranslator1.TranslateComponentRecursive(Self);
68end;
69
70end.
71
Note: See TracBrowser for help on using the repository browser.