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