[453] | 1 | //kt -- Modified with SourceScanner on 7/17/2007
|
---|
| 2 | unit fLabInfo;
|
---|
| 3 |
|
---|
| 4 | interface
|
---|
| 5 |
|
---|
| 6 | uses
|
---|
| 7 | Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
|
---|
| 8 | StdCtrls, ExtCtrls, fAutoSz, ORFn, ORCtrls, DKLang;
|
---|
| 9 |
|
---|
| 10 | type
|
---|
| 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 |
|
---|
| 28 | var
|
---|
| 29 | frmLabInfo: TfrmLabInfo;
|
---|
| 30 | function ExecuteLabInfo: Boolean;
|
---|
| 31 |
|
---|
| 32 | implementation
|
---|
| 33 |
|
---|
| 34 | uses fLabs, rLabs;
|
---|
| 35 |
|
---|
| 36 | {$R *.DFM}
|
---|
| 37 |
|
---|
| 38 | function ExecuteLabInfo: Boolean;
|
---|
| 39 | begin
|
---|
| 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;
|
---|
| 50 | end;
|
---|
| 51 |
|
---|
| 52 | procedure TfrmLabInfo.btnOKClick(Sender: TObject);
|
---|
| 53 | begin
|
---|
| 54 | OKPressed := true;
|
---|
| 55 | Close;
|
---|
| 56 | end;
|
---|
| 57 |
|
---|
| 58 | procedure TfrmLabInfo.FormCreate(Sender: TObject);
|
---|
| 59 |
|
---|
| 60 | begin
|
---|
| 61 | RedrawSuspend(cboTests.Handle);
|
---|
| 62 | cboTests.InitLongList('');
|
---|
| 63 | RedrawActivate(cboTests.Handle);
|
---|
| 64 | end;
|
---|
| 65 |
|
---|
| 66 | procedure TfrmLabInfo.cboTestsNeedData(Sender: TObject;
|
---|
| 67 | const StartFrom: string; Direction, InsertAt: Integer);
|
---|
| 68 | begin
|
---|
| 69 | cboTests.ForDataUse(AllTests(StartFrom, Direction));
|
---|
| 70 | end;
|
---|
| 71 |
|
---|
| 72 | procedure TfrmLabInfo.cboTestsClick(Sender: TObject);
|
---|
| 73 | begin
|
---|
| 74 | inherited;
|
---|
| 75 | memInfo.Lines.Assign(TestInfo(cboTests.Items[cboTests.ItemIndex]));
|
---|
| 76 | end;
|
---|
| 77 |
|
---|
| 78 | end.
|
---|