Last change
on this file was 219, checked in by chronos, 5 days ago |
- Modified: Updated Common package.
- Modified: Remove U prefix from unit names.
- Modified: Use Gneeric.Collections instead of fgl.
- Modified: Do not use global form variables.
|
File size:
950 bytes
|
Line | |
---|
1 | unit FormTest;
|
---|
2 |
|
---|
3 | interface
|
---|
4 |
|
---|
5 | uses
|
---|
6 | Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, FormEx,
|
---|
7 | TestCase;
|
---|
8 |
|
---|
9 | type
|
---|
10 |
|
---|
11 | { TFormTest }
|
---|
12 |
|
---|
13 | TFormTest = class(TFormEx)
|
---|
14 | ButtonRun: TButton;
|
---|
15 | ButtonClose: TButton;
|
---|
16 | MemoLog: TMemo;
|
---|
17 | procedure FormShow(Sender: TObject);
|
---|
18 | procedure ButtonRunClick(Sender: TObject);
|
---|
19 | private
|
---|
20 | FTestCase: TTestCase;
|
---|
21 | procedure SetTestCase(AValue: TTestCase);
|
---|
22 | public
|
---|
23 | property TestCase: TTestCase read FTestCase write SetTestCase;
|
---|
24 | end;
|
---|
25 |
|
---|
26 |
|
---|
27 | implementation
|
---|
28 |
|
---|
29 | {$R *.lfm}
|
---|
30 |
|
---|
31 | { TFormTest }
|
---|
32 |
|
---|
33 | procedure TFormTest.FormShow(Sender: TObject);
|
---|
34 | begin
|
---|
35 | if Assigned(FTestCase) then MemoLog.Text := FTestCase.Log;
|
---|
36 | end;
|
---|
37 |
|
---|
38 | procedure TFormTest.SetTestCase(AValue: TTestCase);
|
---|
39 | begin
|
---|
40 | if FTestCase = AValue then Exit;
|
---|
41 | FTestCase := AValue;
|
---|
42 | end;
|
---|
43 |
|
---|
44 | procedure TFormTest.ButtonRunClick(Sender: TObject);
|
---|
45 | begin
|
---|
46 | if Assigned(FTestCase) then begin
|
---|
47 | FTestCase.Run;
|
---|
48 | MemoLog.Text := FTestCase.Log;
|
---|
49 | end;
|
---|
50 | end;
|
---|
51 |
|
---|
52 | end.
|
---|
53 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.