| 1 | Unit ProductInformationFormUnit;
|
|---|
| 2 |
|
|---|
| 3 | Interface
|
|---|
| 4 |
|
|---|
| 5 | Uses
|
|---|
| 6 | Classes, Forms, Graphics, ExtCtrls, StdCtrls, Buttons,
|
|---|
| 7 | ACLLanguageUnit;
|
|---|
| 8 |
|
|---|
| 9 | Type
|
|---|
| 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 |
|
|---|
| 29 | Var
|
|---|
| 30 | ProductInformationForm: TProductInformationForm;
|
|---|
| 31 |
|
|---|
| 32 | Implementation
|
|---|
| 33 |
|
|---|
| 34 | Uses
|
|---|
| 35 | ControlsUtility,
|
|---|
| 36 | WebBrowserUnit;
|
|---|
| 37 |
|
|---|
| 38 | Procedure TProductInformationForm.WebPageEditOnClick (Sender: TObject);
|
|---|
| 39 | Begin
|
|---|
| 40 | LaunchURL( 'http://' + WebPageEdit.Text );
|
|---|
| 41 | End;
|
|---|
| 42 |
|
|---|
| 43 | Procedure TProductInformationForm.EmailEditOnClick (Sender: TObject);
|
|---|
| 44 | Begin
|
|---|
| 45 | LaunchURL( 'mailto://' + EmailEdit.Text );
|
|---|
| 46 | End;
|
|---|
| 47 |
|
|---|
| 48 | Procedure TProductInformationForm.ProductInformationFormOnSetupShow (Sender: TObject);
|
|---|
| 49 | Begin
|
|---|
| 50 | ScaleForm( self, 8, 16 );
|
|---|
| 51 | End;
|
|---|
| 52 |
|
|---|
| 53 | Procedure TProductInformationForm.ProductInformationFormOnCreate (Sender: TObject);
|
|---|
| 54 | Begin
|
|---|
| 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 |
|
|---|
| 68 | End;
|
|---|
| 69 |
|
|---|
| 70 | Procedure TProductInformationForm.OnLanguageEvent( Language: TLanguageFile;
|
|---|
| 71 | const Apply: boolean );
|
|---|
| 72 | begin
|
|---|
| 73 | Language.LoadComponentLanguage( self, Apply );
|
|---|
| 74 |
|
|---|
| 75 | // so they cannae hide it with language file
|
|---|
| 76 | CopyrightLabel.Caption := 'Copyright 2005 Aaron Lawrence';
|
|---|
| 77 | end;
|
|---|
| 78 |
|
|---|
| 79 | Initialization
|
|---|
| 80 | RegisterClasses ([TProductInformationForm, TBevel, TLabel, TImage, TButton,
|
|---|
| 81 | TEdit]);
|
|---|
| 82 | End.
|
|---|