Last change
on this file since 459 was 459, checked in by Kevin Toppenberg, 16 years ago |
Adding foia-cprs branch
|
File size:
1.5 KB
|
Rev | Line | |
---|
[459] | 1 | unit fNotesBP;
|
---|
| 2 |
|
---|
| 3 | interface
|
---|
| 4 |
|
---|
| 5 | uses
|
---|
| 6 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
| 7 | fAutoSz, StdCtrls, ExtCtrls;
|
---|
| 8 |
|
---|
| 9 | type
|
---|
| 10 | TfrmNotesBP = class(TfrmAutoSz)
|
---|
| 11 | Label1: TStaticText;
|
---|
| 12 | radOptions: TRadioGroup;
|
---|
| 13 | cmdPreview: TButton;
|
---|
| 14 | cmdClose: TButton;
|
---|
| 15 | procedure cmdPreviewClick(Sender: TObject);
|
---|
| 16 | procedure cmdCloseClick(Sender: TObject);
|
---|
| 17 | procedure FormKeyUp(Sender: TObject; var Key: Word;
|
---|
| 18 | Shift: TShiftState);
|
---|
| 19 | private
|
---|
| 20 | FBPText: TStrings;
|
---|
| 21 | public
|
---|
| 22 | { Public declarations }
|
---|
| 23 | end;
|
---|
| 24 |
|
---|
| 25 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
| 26 |
|
---|
| 27 | implementation
|
---|
| 28 |
|
---|
| 29 | {$R *.DFM}
|
---|
| 30 |
|
---|
| 31 | uses ORFn, fRptBox;
|
---|
| 32 |
|
---|
| 33 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
| 34 | var
|
---|
| 35 | frmNotesBP: TfrmNotesBP;
|
---|
| 36 | begin
|
---|
| 37 | frmNotesBP := TfrmNotesBP.Create(Application);
|
---|
| 38 | try
|
---|
| 39 | ResizeFormToFont(TForm(frmNotesBP));
|
---|
| 40 | with frmNotesBP do
|
---|
| 41 | begin
|
---|
| 42 | FBPText := BPText;
|
---|
| 43 | ShowModal;
|
---|
| 44 | Result := radOptions.ItemIndex;
|
---|
| 45 | end;
|
---|
| 46 | finally
|
---|
| 47 | frmNotesBP.Release;
|
---|
| 48 | end;
|
---|
| 49 | end;
|
---|
| 50 |
|
---|
| 51 | procedure TfrmNotesBP.cmdPreviewClick(Sender: TObject);
|
---|
| 52 | begin
|
---|
| 53 | inherited;
|
---|
| 54 | ReportBox(FBPText, 'Boilerplate Text Preview', False);
|
---|
| 55 | end;
|
---|
| 56 |
|
---|
| 57 | procedure TfrmNotesBP.cmdCloseClick(Sender: TObject);
|
---|
| 58 | begin
|
---|
| 59 | inherited;
|
---|
| 60 | Close;
|
---|
| 61 | end;
|
---|
| 62 |
|
---|
| 63 | procedure TfrmNotesBP.FormKeyUp(Sender: TObject; var Key: Word;
|
---|
| 64 | Shift: TShiftState);
|
---|
| 65 | begin
|
---|
| 66 | inherited;
|
---|
| 67 | if Key = VK_ESCAPE then begin
|
---|
| 68 | Key := 0;
|
---|
| 69 | radOptions.ItemIndex := 0; //Ignore
|
---|
| 70 | Close;
|
---|
| 71 | end;
|
---|
| 72 | end;
|
---|
| 73 |
|
---|
| 74 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.