source: trunk/Packages/Common/UAboutDialog.pas

Last change on this file was 80, checked in by chronos, 3 years ago
  • Modified: Use About dialog component from Common package.
File size: 1.0 KB
Line 
1unit UAboutDialog;
2
3{$mode delphi}
4
5interface
6
7uses
8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
9 StdCtrls, ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
10
11type
12
13 { TAboutDialog }
14
15 TAboutDialog = class(TComponent)
16 private
17 FApplicationInfo: TApplicationInfo;
18 FCoolTranslator: TTranslator;
19 FThemeManager: TThemeManager;
20 public
21 FormAbout: TFormAbout;
22 procedure Show;
23 published
24 property CoolTranslator: TTranslator read FCoolTranslator write FCoolTranslator;
25 property ThemeManager: TThemeManager read FThemeManager write FThemeManager;
26 property ApplicationInfo: TApplicationInfo read FApplicationInfo write
27 FApplicationInfo;
28 end;
29
30procedure Register;
31
32
33implementation
34
35procedure Register;
36begin
37 RegisterComponents('Common', [TAboutDialog]);
38end;
39
40{ TAboutDialog }
41
42procedure TAboutDialog.Show;
43begin
44 FormAbout := TFormAbout.Create(nil);
45 try
46 FormAbout.AboutDialog := Self;
47 FormAbout.ShowModal;
48 finally
49 FreeAndNil(FormAbout);
50 end;
51end;
52
53end.
54
Note: See TracBrowser for help on using the repository browser.