Last change
on this file since 461 was 456, checked in by Kevin Toppenberg, 16 years ago |
Initial Upload of Official WV CPRS 1.0.26.76
|
File size:
1.5 KB
|
Line | |
---|
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 | btnPanel: TPanel;
|
---|
14 | cmdPreview: TButton;
|
---|
15 | cmdClose: TButton;
|
---|
16 | procedure cmdPreviewClick(Sender: TObject);
|
---|
17 | procedure cmdCloseClick(Sender: TObject);
|
---|
18 | procedure FormKeyUp(Sender: TObject; var Key: Word;
|
---|
19 | Shift: TShiftState);
|
---|
20 | private
|
---|
21 | FBPText: TStrings;
|
---|
22 | public
|
---|
23 | { Public declarations }
|
---|
24 | end;
|
---|
25 |
|
---|
26 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
27 |
|
---|
28 | implementation
|
---|
29 |
|
---|
30 | {$R *.DFM}
|
---|
31 |
|
---|
32 | uses ORFn, fRptBox;
|
---|
33 |
|
---|
34 | function QueryBoilerPlate(BPText: TStrings): Integer;
|
---|
35 | var
|
---|
36 | frmNotesBP: TfrmNotesBP;
|
---|
37 | begin
|
---|
38 | frmNotesBP := TfrmNotesBP.Create(Application);
|
---|
39 | try
|
---|
40 | ResizeFormToFont(TForm(frmNotesBP));
|
---|
41 | with frmNotesBP do
|
---|
42 | begin
|
---|
43 | FBPText := BPText;
|
---|
44 | ShowModal;
|
---|
45 | Result := radOptions.ItemIndex;
|
---|
46 | end;
|
---|
47 | finally
|
---|
48 | frmNotesBP.Release;
|
---|
49 | end;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | procedure TfrmNotesBP.cmdPreviewClick(Sender: TObject);
|
---|
53 | begin
|
---|
54 | inherited;
|
---|
55 | ReportBox(FBPText, 'Boilerplate Text Preview', False);
|
---|
56 | end;
|
---|
57 |
|
---|
58 | procedure TfrmNotesBP.cmdCloseClick(Sender: TObject);
|
---|
59 | begin
|
---|
60 | inherited;
|
---|
61 | Close;
|
---|
62 | end;
|
---|
63 |
|
---|
64 | procedure TfrmNotesBP.FormKeyUp(Sender: TObject; var Key: Word;
|
---|
65 | Shift: TShiftState);
|
---|
66 | begin
|
---|
67 | inherited;
|
---|
68 | if Key = VK_ESCAPE then begin
|
---|
69 | Key := 0;
|
---|
70 | radOptions.ItemIndex := 0; //Ignore
|
---|
71 | Close;
|
---|
72 | end;
|
---|
73 | end;
|
---|
74 |
|
---|
75 | end.
|
---|
Note:
See
TracBrowser
for help on using the repository browser.