source: cprs/branches/foia-cprs/CPRS-Chart/fPtSelOptSave.pas@ 1094

Last change on this file since 1094 was 459, checked in by Kevin Toppenberg, 16 years ago

Adding foia-cprs branch

File size: 1.9 KB
Line 
1unit fPtSelOptSave;
2
3interface
4
5uses
6 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
7 StdCtrls, ExtCtrls, ORCtrls, ORFn;
8
9type
10 TfrmPtSelOptSave = class(TForm)
11 pnlClinSave: TPanel;
12 rGrpClinSave: TKeyClickRadioGroup;
13 lblClinSettings: TMemo;
14 btnOK: TButton;
15 btnCancel: TButton;
16 procedure FormCreate(Sender: TObject);
17 procedure btnCancelClick(Sender: TObject);
18 procedure btnOKClick(Sender: TObject);
19 procedure rGrpClinSaveClick(Sender: TObject);
20 private
21 { Private declarations }
22 public
23 { Public declarations }
24 end;
25
26var
27 frmPtSelOptSave: TfrmPtSelOptSave;
28
29implementation
30
31{$R *.DFM}
32
33uses
34 rCore, fPtSelOptns;
35
36procedure TfrmPtSelOptSave.FormCreate(Sender: TObject);
37begin
38 ResizeAnchoredFormToFont(self);
39 self.caption := 'Save Patient List Settings';
40 fPtSelOptns.clinDoSave := false; // Initialize.
41 fPtSelOptns.clinSaveToday := false;
42 lblClinSettings.text := 'Save ' + fPtSelOptns.clinDefaults +
43 CRLF + ' defaults as follows?';
44 rGrpClinSave.itemIndex := -1;
45// rGrpClinSave.TabStop := True;
46 btnOK.Enabled := False;
47end;
48
49procedure TfrmPtSelOptSave.btnCancelClick(Sender: TObject);
50begin
51 close;
52end;
53
54procedure TfrmPtSelOptSave.btnOKClick(Sender: TObject);
55begin
56
57if ((rGrpClinSave.itemIndex < 0) or (rGrpClinSave.itemIndex >1)) then
58 begin
59 InfoBox('No selection made', 'Clinic Save Options', MB_OK);
60 exit;
61 end;
62 if (rGrpClinSave.itemIndex = 0) then
63 fPtSelOptns.clinSaveToday := false;
64 if (rGrpClinSave.itemIndex = 1) then
65 fPtSelOptns.clinSaveToday := true;
66 fPtSelOptns.clinDoSave := true;
67close;
68
69end;
70
71procedure TfrmPtSelOptSave.rGrpClinSaveClick(Sender: TObject);
72var
73 Chosen: Boolean;
74begin
75 Chosen := rGrpClinSave.ItemIndex >= 0;
76// rGrpClinSave.TabStop := not Chosen;
77 btnOK.Enabled := Chosen;
78end;
79
80end.
Note: See TracBrowser for help on using the repository browser.