source: cprs/branches/tmg-cprs/CPRS-Chart/fDupPts.pas@ 1099

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

Initial upload of TMG-CPRS 1.0.26.69

File size: 2.1 KB
Line 
1//kt -- Modified with SourceScanner on 7/17/2007
2unit fDupPts;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Variants, Classes, Graphics,
8 Controls, Forms, Dialogs, StdCtrls, ORCtrls, ExtCtrls, OrFn, DKLang;
9
10type
11 TfrmDupPts = class(TForm)
12 pnlDupPts: TPanel;
13 btnOK: TButton;
14 btnCancel: TButton;
15 pnlSelDupPt: TPanel;
16 lboSelPt: TORListBox;
17 lblDupPts: TLabel;
18 lblSelDupPts: TLabel;
19 DKLanguageController1: TDKLanguageController;
20 procedure btnCancelClick(Sender: TObject);
21 procedure FormCreate(Sender: TObject);
22 procedure btnOKClick(Sender: TObject);
23 procedure FormKeyDown(Sender: TObject; var Key: Word;
24 Shift: TShiftState);
25 procedure lboSelPtDblClick(Sender: TObject);
26 private
27 { Private declarations }
28 public
29 { Public declarations }
30 end;
31
32var
33 frmDupPts: TfrmDupPts;
34
35implementation
36
37{$R *.dfm}
38
39uses rCore, uCore, fPtSel;
40
41procedure TfrmDupPts.btnCancelClick(Sender: TObject);
42begin
43
44close;
45
46end;
47
48procedure TfrmDupPts.FormCreate(Sender: TObject);
49var
50 theDups: tStringList;
51begin
52//fPtSel.DupDFN := 'Cancel'; // Pre-set as default. <-- original line. //kt 7/17/2007
53 fPtSel.DupDFN := DKLangConstW('fDupPts_Cancel'); // Pre-set as default. //kt added 7/17/2007
54 theDups := tStringList.create;
55 theDups.assign(fPtSel.PtStrs);
56 lboSelPt.items.assign(theDups);
57 ResizeAnchoredFormToFont(self);
58end;
59
60procedure TfrmDupPts.btnOKClick(Sender: TObject);
61begin
62
63if not (Length(lboSelPt.ItemID) > 0) then //*DFN*
64begin
65//infoBox('A patient has not been selected.', 'No Patient Selected', MB_OK); <-- original line. //kt 7/17/2007
66 infoBox(DKLangConstW('fDupPts_A_patient_has_not_been_selectedx'), DKLangConstW('fDupPts_No_Patient_Selected'), MB_OK); //kt added 7/17/2007
67 exit;
68end;
69
70fPtSel.DupDFN := lboSelPt.ItemID; //*DFN*
71close;
72
73end;
74
75procedure TfrmDupPts.FormKeyDown(Sender: TObject; var Key: Word;
76 Shift: TShiftState);
77begin
78
79// Check for "Esc" keypress:
80if (key = 27) then // ESC key.
81 btnCancel.click;
82
83end;
84
85procedure TfrmDupPts.lboSelPtDblClick(Sender: TObject);
86begin
87 btnOKClick(btnOK);
88end;
89
90end.
Note: See TracBrowser for help on using the repository browser.