[453] | 1 | //kt -- Modified with SourceScanner on 7/24/2007
|
---|
| 2 | unit fNotesBP;
|
---|
| 3 |
|
---|
| 4 | interface
|
---|
| 5 |
|
---|
| 6 | uses
|
---|
| 7 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
| 8 | fAutoSz, StdCtrls, ExtCtrls, DKLang;
|
---|
| 9 |
|
---|
| 10 | type
|
---|
| 11 | TfrmNotesBP = class(TfrmAutoSz)
|
---|
| 12 | Label1: TStaticText;
|
---|
| 13 | radOptions: TRadioGroup;
|
---|
| 14 | btnPanel: TPanel;
|
---|
| 15 | cmdPreview: TButton;
|
---|
| 16 | cmdClose: TButton;
|
---|
| 17 | DKLanguageController2: TDKLanguageController;
|
---|
| 18 | procedure cmdPreviewClick(Sender: TObject);
|
---|
| 19 | procedure cmdCloseClick(Sender: TObject);
|
---|
| 20 | procedure FormKeyUp(Sender: TObject; var Key: Word;
|
---|
| 21 | Shift: TShiftState);
|
---|
| 22 | private
|
---|
| 23 | FBPText: TStrings;
|
---|
| 24 | public
|
---|
| 25 | { Public declarations }
|
---|
| 26 | end;
|
---|
| 27 |
|
---|
| 28 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
| 29 |
|
---|
| 30 | implementation
|
---|
| 31 |
|
---|
| 32 | {$R *.DFM}
|
---|
| 33 |
|
---|
| 34 | uses ORFn, fRptBox;
|
---|
| 35 |
|
---|
| 36 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
| 37 | var
|
---|
| 38 | frmNotesBP: TfrmNotesBP;
|
---|
| 39 | begin
|
---|
| 40 | frmNotesBP := TfrmNotesBP.Create(Application);
|
---|
| 41 | try
|
---|
| 42 | ResizeFormToFont(TForm(frmNotesBP));
|
---|
| 43 | with frmNotesBP do
|
---|
| 44 | begin
|
---|
| 45 | FBPText := BPText;
|
---|
| 46 | ShowModal;
|
---|
| 47 | Result := radOptions.ItemIndex;
|
---|
| 48 | end;
|
---|
| 49 | finally
|
---|
| 50 | frmNotesBP.Release;
|
---|
| 51 | end;
|
---|
| 52 | end;
|
---|
| 53 |
|
---|
| 54 | procedure TfrmNotesBP.cmdPreviewClick(Sender: TObject);
|
---|
| 55 | begin
|
---|
| 56 | inherited;
|
---|
| 57 | //ReportBox(FBPText, 'Boilerplate Text Preview', False); <-- original line. //kt 7/24/2007
|
---|
| 58 | ReportBox(FBPText, DKLangConstW('fNotesBP_Boilerplate_Text_Preview'), False); //kt added 7/24/2007
|
---|
| 59 | end;
|
---|
| 60 |
|
---|
| 61 | procedure TfrmNotesBP.cmdCloseClick(Sender: TObject);
|
---|
| 62 | begin
|
---|
| 63 | inherited;
|
---|
| 64 | Close;
|
---|
| 65 | end;
|
---|
| 66 |
|
---|
| 67 | procedure TfrmNotesBP.FormKeyUp(Sender: TObject; var Key: Word;
|
---|
| 68 | Shift: TShiftState);
|
---|
| 69 | begin
|
---|
| 70 | inherited;
|
---|
| 71 | if Key = VK_ESCAPE then begin
|
---|
| 72 | Key := 0;
|
---|
| 73 | radOptions.ItemIndex := 0; //Ignore
|
---|
| 74 | Close;
|
---|
| 75 | end;
|
---|
| 76 | end;
|
---|
| 77 |
|
---|
| 78 | end.
|
---|