| 2263 |
kivins |
1 |
//---------------------------------------------------------------------------
|
|
|
2 |
|
|
|
3 |
#include <vcl.h>
|
|
|
4 |
#pragma hdrstop
|
|
|
5 |
|
|
|
6 |
#include "TestScenarioProperties.h"
|
|
|
7 |
//---------------------------------------------------------------------------
|
|
|
8 |
#pragma package(smart_init)
|
|
|
9 |
#pragma link "AdvPageControl"
|
|
|
10 |
#pragma link "AdvEdit"
|
|
|
11 |
#pragma link "DBAdvEd"
|
|
|
12 |
#pragma link "AdvSpin"
|
|
|
13 |
#pragma link "DBAdvSp"
|
|
|
14 |
#pragma resource "*.dfm"
|
|
|
15 |
TTestScenarioPropertiesForm *TestScenarioPropertiesForm;
|
|
|
16 |
//---------------------------------------------------------------------------
|
|
|
17 |
__fastcall TTestScenarioPropertiesForm::TTestScenarioPropertiesForm(TComponent* Owner)
|
|
|
18 |
: TForm(Owner)
|
|
|
19 |
{
|
|
|
20 |
}
|
|
|
21 |
//---------------------------------------------------------------------------
|
|
|
22 |
|
|
|
23 |
void __fastcall TTestScenarioPropertiesForm::ShowForm( const int & testScenario )
|
|
|
24 |
{
|
|
|
25 |
m_testScenario = testScenario;
|
|
|
26 |
|
|
|
27 |
AnsiString sql;
|
|
|
28 |
sql.sprintf(
|
|
|
29 |
"SELECT "
|
|
|
30 |
"* "
|
|
|
31 |
"FROM "
|
|
|
32 |
"TEST_SCENARIOS "
|
|
|
33 |
"WHERE "
|
|
|
34 |
"TESTSCENARIO_NO=%d",
|
|
|
35 |
testScenario );
|
|
|
36 |
|
|
|
37 |
TestScenarioPropertiesQuery->Close();
|
|
|
38 |
TestScenarioPropertiesQuery->SQL->Text = sql;
|
|
|
39 |
TestScenarioPropertiesQuery->Open();
|
|
|
40 |
|
|
|
41 |
ShowModal();
|
|
|
42 |
}
|
|
|
43 |
|
|
|
44 |
|
|
|
45 |
void __fastcall TTestScenarioPropertiesForm::DescriptionChange(
|
|
|
46 |
TObject *Sender)
|
|
|
47 |
{
|
|
|
48 |
Apply->Enabled = true;
|
|
|
49 |
}
|
|
|
50 |
//---------------------------------------------------------------------------
|
|
|
51 |
|
|
|
52 |
|
|
|
53 |
void __fastcall TTestScenarioPropertiesForm::BatchSizeChange(
|
|
|
54 |
TObject *Sender)
|
|
|
55 |
{
|
|
|
56 |
m_modified = true;
|
|
|
57 |
Apply->Enabled = true;
|
|
|
58 |
}
|
|
|
59 |
//---------------------------------------------------------------------------
|
|
|
60 |
|
|
|
61 |
void __fastcall TTestScenarioPropertiesForm::RepeatCountChange(
|
|
|
62 |
TObject *Sender)
|
|
|
63 |
{
|
|
|
64 |
m_modified = true;
|
|
|
65 |
Apply->Enabled = true;
|
|
|
66 |
}
|
|
|
67 |
//---------------------------------------------------------------------------
|
|
|
68 |
|
|
|
69 |
void __fastcall TTestScenarioPropertiesForm::ApplyClick(TObject *Sender)
|
|
|
70 |
{
|
|
|
71 |
m_modified = false;
|
|
|
72 |
Apply->Enabled = false;
|
|
|
73 |
|
|
|
74 |
TestScenarioPropertiesQuery->Post();
|
|
|
75 |
}
|
|
|
76 |
//---------------------------------------------------------------------------
|
|
|
77 |
|
|
|
78 |
void __fastcall TTestScenarioPropertiesForm::FormShow(TObject *Sender)
|
|
|
79 |
{
|
|
|
80 |
m_modified = false;
|
|
|
81 |
Apply->Enabled = false;
|
|
|
82 |
}
|
|
|
83 |
//---------------------------------------------------------------------------
|
|
|
84 |
|
|
|
85 |
void __fastcall TTestScenarioPropertiesForm::OKClick(TObject *Sender)
|
|
|
86 |
{
|
|
|
87 |
if ( m_modified )
|
|
|
88 |
{
|
|
|
89 |
TestScenarioPropertiesQuery->Post();
|
|
|
90 |
}
|
|
|
91 |
}
|
|
|
92 |
//---------------------------------------------------------------------------
|
|
|
93 |
|