source: cprs/branches/tmg-cprs/CPRS-Chart/fLabInfo.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: 1.7 KB
Line 
1//kt -- Modified with SourceScanner on 7/17/2007
2unit fLabInfo;
3
4interface
5
6uses
7 Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
8 StdCtrls, ExtCtrls, fAutoSz, ORFn, ORCtrls, DKLang;
9
10type
11 TfrmLabInfo = class(TfrmAutoSz)
12 Panel1: TPanel;
13 btnOK: TButton;
14 memInfo: TCaptionMemo;
15 cboTests: TORComboBox;
16 procedure btnOKClick(Sender: TObject);
17 procedure FormCreate(Sender: TObject);
18 procedure cboTestsNeedData(Sender: TObject; const StartFrom: string;
19 Direction, InsertAt: Integer);
20 procedure cboTestsClick(Sender: TObject);
21 private
22 { Private declarations }
23 OKPressed: Boolean;
24 public
25 { Public declarations }
26 end;
27
28var
29 frmLabInfo: TfrmLabInfo;
30 function ExecuteLabInfo: Boolean;
31
32implementation
33
34uses fLabs, rLabs;
35
36{$R *.DFM}
37
38function ExecuteLabInfo: Boolean;
39begin
40 Result := False;
41 frmLabInfo := TfrmLabInfo.Create(Application);
42 try
43 ResizeFormToFont(TForm(frmLabInfo));
44 frmLabInfo.ShowModal;
45 if frmLabInfo.OKPressed then
46 Result := True;
47 finally
48 frmLabInfo.Release;
49 end;
50end;
51
52procedure TfrmLabInfo.btnOKClick(Sender: TObject);
53begin
54 OKPressed := true;
55 Close;
56end;
57
58procedure TfrmLabInfo.FormCreate(Sender: TObject);
59
60begin
61 RedrawSuspend(cboTests.Handle);
62 cboTests.InitLongList('');
63 RedrawActivate(cboTests.Handle);
64end;
65
66procedure TfrmLabInfo.cboTestsNeedData(Sender: TObject;
67 const StartFrom: string; Direction, InsertAt: Integer);
68begin
69 cboTests.ForDataUse(AllTests(StartFrom, Direction));
70end;
71
72procedure TfrmLabInfo.cboTestsClick(Sender: TObject);
73begin
74 inherited;
75 memInfo.Lines.Assign(TestInfo(cboTests.Items[cboTests.ItemIndex]));
76end;
77
78end.
Note: See TracBrowser for help on using the repository browser.