source: cprs/branches/foia-cprs/CPRS-Chart/fNotesBP.pas@ 459

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
Line 
1unit fNotesBP;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 fAutoSz, StdCtrls, ExtCtrls;
8
9type
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
25function QueryBoilerPlate(BPText: TStrings): Integer;
26
27implementation
28
29{$R *.DFM}
30
31uses ORFn, fRptBox;
32
33function QueryBoilerPlate(BPText: TStrings): Integer;
34var
35 frmNotesBP: TfrmNotesBP;
36begin
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;
49end;
50
51procedure TfrmNotesBP.cmdPreviewClick(Sender: TObject);
52begin
53 inherited;
54 ReportBox(FBPText, 'Boilerplate Text Preview', False);
55end;
56
57procedure TfrmNotesBP.cmdCloseClick(Sender: TObject);
58begin
59 inherited;
60 Close;
61end;
62
63procedure TfrmNotesBP.FormKeyUp(Sender: TObject; var Key: Word;
64 Shift: TShiftState);
65begin
66 inherited;
67 if Key = VK_ESCAPE then begin
68 Key := 0;
69 radOptions.ItemIndex := 0; //Ignore
70 Close;
71 end;
72end;
73
74end.
Note: See TracBrowser for help on using the repository browser.