source:
trunk/Packages/Common/Forms/FormTest.pas
| Last change on this file was 1, checked in by , 4 weeks ago | |
|---|---|
| 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.
![(please configure the [header_logo] section in trac.ini)](/edc-stats/chrome/site/your_project_logo.png)