1 | unit UFormAbout;
|
---|
2 |
|
---|
3 | {$MODE Delphi}
|
---|
4 |
|
---|
5 | interface
|
---|
6 |
|
---|
7 | uses
|
---|
8 | SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
---|
9 | Buttons, ExtCtrls, UApplicationInfo;
|
---|
10 |
|
---|
11 | type
|
---|
12 |
|
---|
13 | { TFormAbout }
|
---|
14 |
|
---|
15 | TFormAbout = class(TForm)
|
---|
16 | Panel1: TPanel;
|
---|
17 | ButtonOk: TButton;
|
---|
18 | Memo1: TMemo;
|
---|
19 | procedure FormResize(Sender: TObject);
|
---|
20 | procedure ButtonOkClick(Sender: TObject);
|
---|
21 | procedure FormShow(Sender: TObject);
|
---|
22 | private
|
---|
23 | { Private declarations }
|
---|
24 | public
|
---|
25 | ApplicationInfo: TApplicationInfo;
|
---|
26 | end;
|
---|
27 |
|
---|
28 | var
|
---|
29 | FormAbout: TFormAbout;
|
---|
30 |
|
---|
31 | implementation
|
---|
32 |
|
---|
33 | resourcestring
|
---|
34 | SApplicationName = 'Application name';
|
---|
35 | SVersion = 'Version';
|
---|
36 | SReleaseDate = 'Release date';
|
---|
37 | SManufacturer = 'Company';
|
---|
38 | SEmail = 'E-mail';
|
---|
39 | SAuthor = 'Author';
|
---|
40 | SDescription = 'Description';
|
---|
41 | SHomePage = 'Web';
|
---|
42 |
|
---|
43 | {$R *.lfm}
|
---|
44 |
|
---|
45 | procedure TFormAbout.FormShow(Sender: TObject);
|
---|
46 | begin
|
---|
47 | if Assigned(ApplicationInfo) then
|
---|
48 | with Memo1, Lines, ApplicationInfo do begin
|
---|
49 | BeginUpdate;
|
---|
50 | Clear;
|
---|
51 | Add(SApplicationName + ': ' + AppName);
|
---|
52 | Add(SDescription + ': ' + Description);
|
---|
53 | Add(SVersion + ': ' + Version);
|
---|
54 | Add(SReleaseDate + ': ' + DateToStr(ReleaseDate));
|
---|
55 | //Add(SManufacturer + ': ' + CompanyName);
|
---|
56 | Add(SAuthor + ': ' + AuthorsName);
|
---|
57 | Add(SHomePage + ': ' + HomePage);
|
---|
58 | Add(SEmail + ': ' + EmailContact);
|
---|
59 | EndUpdate;
|
---|
60 | end;
|
---|
61 | FocusControl(ButtonOk);
|
---|
62 | end;
|
---|
63 |
|
---|
64 | procedure TFormAbout.ButtonOkClick(Sender: TObject);
|
---|
65 | begin
|
---|
66 | Close;
|
---|
67 | end;
|
---|
68 |
|
---|
69 | procedure TFormAbout.FormResize(Sender: TObject);
|
---|
70 | begin
|
---|
71 | ButtonOk.Left := (Width - ButtonOk.Width - 30) div 2;
|
---|
72 | end;
|
---|
73 |
|
---|
74 | end.
|
---|
75 |
|
---|