source: cprs/trunk/CPRS-Chart/fNotesBP.pas@ 924

Last change on this file since 924 was 830, checked in by Kevin Toppenberg, 14 years ago

Upgrading to version 27

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