source: trunk/ae/ProductInformationFormUnit.pas

Last change on this file was 460, checked in by ataylor, 3 years ago

AE now uses WindowText font and scales controls as needed.

File size: 2.2 KB
Line 
1Unit ProductInformationFormUnit;
2
3Interface
4
5Uses
6 Classes, Forms, Graphics, ExtCtrls, StdCtrls, Buttons,
7 ACLLanguageUnit;
8
9Type
10 TProductInformationForm = Class (TForm)
11 Bevel1: TBevel;
12 LogoImage: TImage;
13 CopyrightLabel: TLabel;
14 OKButton: TButton;
15 TranslationInfoLabel: TLabel;
16 NameAndVersionEdit: TEdit;
17 WebPageEdit: TEdit;
18 EmailEdit: TEdit;
19 Procedure WebPageEditOnClick (Sender: TObject);
20 Procedure EmailEditOnClick (Sender: TObject);
21 Procedure ProductInformationFormOnSetupShow (Sender: TObject);
22 Procedure ProductInformationFormOnCreate (Sender: TObject);
23 Private
24 Public
25 Procedure OnLanguageEvent( Language: TLanguageFile;
26 const Apply: boolean );
27 End;
28
29Var
30 ProductInformationForm: TProductInformationForm;
31
32Implementation
33
34Uses
35 ControlsUtility,
36 WebBrowserUnit;
37
38Procedure TProductInformationForm.WebPageEditOnClick (Sender: TObject);
39Begin
40 LaunchURL( 'http://' + WebPageEdit.Text );
41End;
42
43Procedure TProductInformationForm.EmailEditOnClick (Sender: TObject);
44Begin
45 LaunchURL( 'mailto://' + EmailEdit.Text );
46End;
47
48Procedure TProductInformationForm.ProductInformationFormOnSetupShow (Sender: TObject);
49Begin
50 ScaleForm( self, 8, 16 );
51End;
52
53Procedure TProductInformationForm.ProductInformationFormOnCreate (Sender: TObject);
54Begin
55 RegisterForLanguages( OnLanguageEvent );
56 Font := GetNiceDefaultFont;
57
58 NameAndVersionEdit.Font := Screen.CreateCompatibleFont( Font );
59 NameAndVersionEdit.Font.Attributes := [ faBold ];
60
61 WebPageEdit.Font := Screen.CreateCompatibleFont( Font );
62 WebPageEdit.Font.Attributes := [ faUnderscore ];
63 EmailEdit.Font := WebPageEdit.Font;
64
65 WebPageEdit.Cursor := GetLinkCursor;
66 EmailEdit.Cursor := GetLinkCursor;
67
68End;
69
70Procedure TProductInformationForm.OnLanguageEvent( Language: TLanguageFile;
71 const Apply: boolean );
72begin
73 Language.LoadComponentLanguage( self, Apply );
74
75 // so they cannae hide it with language file
76 CopyrightLabel.Caption := 'Copyright 2005 Aaron Lawrence';
77end;
78
79Initialization
80 RegisterClasses ([TProductInformationForm, TBevel, TLabel, TImage, TButton,
81 TEdit]);
82End.
Note: See TracBrowser for help on using the repository browser.