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 | |
---|
1 | unit UAboutDialog;
|
---|
2 |
|
---|
3 | {$mode delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
|
---|
9 | StdCtrls, ExtCtrls, UApplicationInfo, UCommon, UTranslator, UTheme, UFormAbout;
|
---|
10 |
|
---|
11 | type
|
---|
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 |
|
---|
30 | procedure Register;
|
---|
31 |
|
---|
32 |
|
---|
33 | implementation
|
---|
34 |
|
---|
35 | procedure Register;
|
---|
36 | begin
|
---|
37 | RegisterComponents('Common', [TAboutDialog]);
|
---|
38 | end;
|
---|
39 |
|
---|
40 | { TAboutDialog }
|
---|
41 |
|
---|
42 | procedure TAboutDialog.Show;
|
---|
43 | begin
|
---|
44 | FormAbout := TFormAbout.Create(nil);
|
---|
45 | try
|
---|
46 | FormAbout.AboutDialog := Self;
|
---|
47 | FormAbout.ShowModal;
|
---|
48 | finally
|
---|
49 | FreeAndNil(FormAbout);
|
---|
50 | end;
|
---|
51 | end;
|
---|
52 |
|
---|
53 | end.
|
---|
54 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.