-
Notifications
You must be signed in to change notification settings - Fork 0
/
DTAWayChoose.cpp
77 lines (62 loc) · 2.34 KB
/
DTAWayChoose.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DTAWayChoose.h"
#include "doseshell.h"
#include "GlobalData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "RzPanel"
#pragma link "RzRadGrp"
#pragma link "RzButton"
#pragma link "RzLabel"
#pragma resource "*.dfm"
TFormDTAWayChoose *FormDTAWayChoose;
//---------------------------------------------------------------------------
__fastcall TFormDTAWayChoose::TFormDTAWayChoose(TComponent* Owner,bool absoulte)
: TForm(Owner)
{
this->abosulteCheck = absoulte;
}
//---------------------------------------------------------------------------
void __fastcall TFormDTAWayChoose::RzBitBtnOKClick(TObject *Sender)
{
Hide();
GlobalMembers *globalMem = NULL;
DoseCheck* doseCheck = NULL;
globalMem = GlobalMembers::getInstance();
if(NULL == globalMem){
RunningLog::writeLog("The globalInstance is NULL;",__LINE__);
return;
}
doseCheck = globalMem->getDoseCheck();
if(NULL == doseCheck){
RunningLog::writeLog("The doseCheck is NULL;",__LINE__);
return;
}
if(true == this->abosulteCheck){
if(RzRadioGroupDTA->Buttons[0]->Checked){
doseCheck->check(CHECKTYPE(ABS_DTA_FloatWay));
}else if(RzRadioGroupDTA->Buttons[1]->Checked){
doseCheck->check(CHECKTYPE(ABS_DTA_MidValueWay));
}else if(RzRadioGroupDTA->Buttons[2]->Checked){
doseCheck->check(CHECKTYPE(ABS_DTA_SamePositionWay));
}
}else{
if(RzRadioGroupDTA->Buttons[0]->Checked){
doseCheck->check(CHECKTYPE(REL_DTA_FloatWay));
}else if(RzRadioGroupDTA->Buttons[1]->Checked){
doseCheck->check(CHECKTYPE(REL_DTA_MidValueWay));
}else if(RzRadioGroupDTA->Buttons[2]->Checked){
doseCheck->check(CHECKTYPE(REL_DTA_SamePositionWay));
}
}
*MainFormTempValue.checkedRecord.getSingleDTAResult() = *doseCheck->getCheckedRecord()->getSingleDTAResult();
FormMain->showDTAResult();
MainFormTempValue.checkedRecord.setCheckedStatus(true);
MainFormTempValue.checkedRecord.setCheckType(doseCheck->getCheckedRecord()->getCheckType());
globalMem = NULL;
doseCheck = NULL;
Close();
}
//---------------------------------------------------------------------------