| 1 | Unit FindFormUnit;
|
|---|
| 2 |
|
|---|
| 3 | Interface
|
|---|
| 4 |
|
|---|
| 5 | Uses
|
|---|
| 6 | Classes, Forms, Graphics, Buttons, StdCtrls,
|
|---|
| 7 | ACLLanguageUnit;
|
|---|
| 8 |
|
|---|
| 9 | Type
|
|---|
| 10 | TFindForm = Class (TForm)
|
|---|
| 11 | OKButton: TButton;
|
|---|
| 12 | CancelButton: TButton;
|
|---|
| 13 | TextToFindLabel: TLabel;
|
|---|
| 14 | FromTopCheckBox: TCheckBox;
|
|---|
| 15 | HelpButton: TButton;
|
|---|
| 16 | TextToFindEdit: TEdit;
|
|---|
| 17 | CaseSensitiveCheckBox: TCheckBox;
|
|---|
| 18 | Procedure FindFormOnSetupShow (Sender: TObject);
|
|---|
| 19 | Procedure OKButtonOnClick (Sender: TObject);
|
|---|
| 20 | Procedure CancelButtonOnClick (Sender: TObject);
|
|---|
| 21 | Procedure FindFormOnCreate (Sender: TObject);
|
|---|
| 22 | Procedure FindFormOnShow (Sender: TObject);
|
|---|
| 23 | Protected
|
|---|
| 24 | Public
|
|---|
| 25 | OnFindClicked: TNotifyEvent;
|
|---|
| 26 | Procedure OnLanguageEvent( Language: TLanguageFile;
|
|---|
| 27 | const Apply: boolean );
|
|---|
| 28 | End;
|
|---|
| 29 |
|
|---|
| 30 | Var
|
|---|
| 31 | FindForm: TFindForm;
|
|---|
| 32 |
|
|---|
| 33 | Implementation
|
|---|
| 34 |
|
|---|
| 35 | Uses
|
|---|
| 36 | ControlsUtility;
|
|---|
| 37 |
|
|---|
| 38 | Procedure TFindForm.FindFormOnSetupShow (Sender: TObject);
|
|---|
| 39 | Begin
|
|---|
| 40 | ScaleForm( self, 11, 16 );
|
|---|
| 41 | End;
|
|---|
| 42 |
|
|---|
| 43 | Procedure TFindForm.OKButtonOnClick (Sender: TObject);
|
|---|
| 44 | Begin
|
|---|
| 45 | OnFindClicked( Sender );
|
|---|
| 46 | End;
|
|---|
| 47 |
|
|---|
| 48 | Procedure TFindForm.CancelButtonOnClick (Sender: TObject);
|
|---|
| 49 | Begin
|
|---|
| 50 | Close;
|
|---|
| 51 | End;
|
|---|
| 52 |
|
|---|
| 53 | Procedure TFindForm.FindFormOnCreate (Sender: TObject);
|
|---|
| 54 | Begin
|
|---|
| 55 | RegisterForLanguages( OnLanguageEvent );
|
|---|
| 56 | End;
|
|---|
| 57 |
|
|---|
| 58 | Procedure TFindForm.OnLanguageEvent( Language: TLanguageFile;
|
|---|
| 59 | const Apply: boolean );
|
|---|
| 60 | begin
|
|---|
| 61 | Language.LoadComponentLanguage( self, Apply );
|
|---|
| 62 | end;
|
|---|
| 63 |
|
|---|
| 64 | Procedure TFindForm.FindFormOnShow (Sender: TObject);
|
|---|
| 65 | Begin
|
|---|
| 66 | OKButton.Default := true;
|
|---|
| 67 | TextToFindEdit.Focus;
|
|---|
| 68 | End;
|
|---|
| 69 |
|
|---|
| 70 | Initialization
|
|---|
| 71 | RegisterClasses ([TFindForm, TButton, TLabel, TEdit, TCheckBox]);
|
|---|
| 72 | End.
|
|---|
| 73 |
|
|---|