source: tags/1.3.1/Forms/UFormAbout.pas

Last change on this file was 96, checked in by chronos, 8 years ago
  • Fixed: Dynamically created forms were not translated.
File size: 1.3 KB
Line 
1unit UFormAbout;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
9 StdCtrls, UApplicationInfo, UCommon;
10
11type
12
13 { TFormAbout }
14
15 TFormAbout = class(TForm)
16 ApplicationInfo1: TApplicationInfo;
17 ButtonHomePage: TButton;
18 ButtonClose: TButton;
19 LabelAppName: TLabel;
20 LabelDescription: TLabel;
21 LabelContent: TLabel;
22 procedure ButtonHomePageClick(Sender: TObject);
23 procedure FormCreate(Sender: TObject);
24 procedure FormShow(Sender: TObject);
25 private
26 { private declarations }
27 public
28 { public declarations }
29 end;
30
31var
32 FormAbout: TFormAbout;
33
34implementation
35
36{$R *.lfm}
37
38uses
39 UCore;
40
41resourcestring
42 SVersion = 'Version';
43 SReleaseDate = 'Release date';
44 SLicense = 'License';
45
46{ TFormAbout }
47
48procedure TFormAbout.FormShow(Sender: TObject);
49begin
50 LabelAppName.Caption := ApplicationInfo1.AppName;
51 LabelContent.Caption := SVersion + ': ' + ApplicationInfo1.Version + LineEnding +
52 SReleaseDate + ': ' + DateToStr(ApplicationInfo1.ReleaseDate) + LineEnding +
53 SLicense + ': ' + ApplicationInfo1.License;
54end;
55
56procedure TFormAbout.ButtonHomePageClick(Sender: TObject);
57begin
58 OpenWebPage(ApplicationInfo1.HomePage);
59end;
60
61procedure TFormAbout.FormCreate(Sender: TObject);
62begin
63 Core.CoolTranslator1.TranslateComponentRecursive(Self);
64end;
65
66end.
67
Note: See TracBrowser for help on using the repository browser.