void LeftRightBothConfig::SaveFile() { Stringoper soper; Streamoper oper; vector<int> VTrainTime; int TrainTime[10]; int number; GetDlgItemText(IDC_EModelTrainTime, m_ModelTrainTime); CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); oper.InitDeseri(soper.tostring(m_ModelTrainTime)); oper.DeserizlizeStream(TrainTime, number, false); for (int i = 0; i < number; i++) { if (TrainTime[i] >= 0) VTrainTime.push_back(TrainTime[i]); } m_Config.SetClassifyTain(VTrainTime); if (((CButton*)GetDlgItem(IDC_RModelTrain))->GetCheck()) m_Config.SetClassifyState(1); if (((CButton*)GetDlgItem(IDC_RModelNotTrain))->GetCheck()) m_Config.SetClassifyState(0); if (((CButton*)GetDlgItem(IDC_RModelReTrain))->GetCheck()) m_Config.ReTrainClassify(1); if (((CButton*)GetDlgItem(IDC_RModelNoReTrain))->GetCheck()) m_Config.ReTrainClassify(0); m_Config.SaveParam(); vector <int>().swap(VTrainTime); }
BOOL LeftRightBothConfig::OnInitDialog() { Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); /*从配置文件Config.txt读取各参数的默认值*/ vector<int> TrainTime; m_ModelTrainTime = L""; m_Config.GetClassifyTrain(TrainTime); for (size_t i = 0; i < TrainTime.size(); i++) { m_ModelTrainTime += oper.tocstring(oper.inttostring(TrainTime[i])) + L" "; } m_ModelPath = m_Config.GetClassifyModel(); m_LeftDataPath = m_Config.GetClassifyLData(); m_RightDataPath = m_Config.GetClassifyRData(); m_BothDataPath = m_Config.GetClassifyBData(); m_ModulePath = m_Config.GetClassifyModule(); if (m_Config.GetClassifystate() == 1) ((CButton*)GetDlgItem(IDC_RModelTrain))->SetCheck(1); else ((CButton*)GetDlgItem(IDC_RModelNotTrain))->SetCheck(1); if (m_Config.IsRetrainClassify() == 1) ((CButton*)GetDlgItem(IDC_RModelReTrain))->SetCheck(1); else ((CButton*)GetDlgItem(IDC_RModelNoReTrain))->SetCheck(1); m_Config.CloseParmFile(); UPDATAVALTOCONTROL; return true; }
BOOL BiteThresholdConfig::OnInitDialog() { Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); /*从配置文件Config.txt读取各参数的默认值*/ m_biteThresholdPath = m_Config.GetBiteThroldModel(); m_biteDataPath = m_Config.GetBiteDataPath(); m_biteThroldModulePath = m_Config.GetBiteModulePath(); int time, count; m_Config.GetBiteTrain(time, count); m_biteTrainTime = oper.tocstring(oper.inttostring(time)); m_biteCount = oper.tocstring(oper.inttostring(count)); if (m_Config.GetBitestate() == 1) ((CButton*)GetDlgItem(IDC_RBiteTrain))->SetCheck(1); else ((CButton*)GetDlgItem(IDC_RBiteNotTrain))->SetCheck(1); m_Config.CloseParmFile(); UPDATAVALTOCONTROL; return true; }
void TLConfig::SaveFile() { Stringoper soper; Streamoper oper; vector<int> VTrainTime; int TrainTime[10]; int number; GetDlgItemText(IDC_ETwoBiteTrainTime, m_TwoBiteTrainTime); CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); oper.InitDeseri(soper.tostring(m_TwoBiteTrainTime)); oper.DeserizlizeStream(TrainTime, number, false); for (int i = 0; i < number; i++) { if (TrainTime[i] >= 0) VTrainTime.push_back(TrainTime[i]); } m_Config.SetTLTrainTime(VTrainTime); if (((CButton*)GetDlgItem(IDC_RTLReTrain))->GetCheck()) m_Config.SetTLReTrain(1); if (((CButton*)GetDlgItem(IDC_RTLNoReTrain))->GetCheck()) m_Config.SetTLReTrain(0); if (((CButton*)GetDlgItem(IDC_RTLTrain))->GetCheck()) m_Config.SetTLTrainState(1); if (((CButton*)GetDlgItem(IDC_RTLNoTrain))->GetCheck()) m_Config.SetTLTrainState(0); m_Config.SaveParam(); vector <int>().swap(VTrainTime); }
int tDigitalDataConfig::tSetting<int, tDigitalDataConfig::tLocalTimeOffsetIfc>::Get() const { if(m_Ifc.GetLocalTimeOffsetFn) { return m_Ifc.GetLocalTimeOffsetFn(); } return m_Config(); }
tRCoord tDigitalDataConfig::tSetting<tRCoord, tDigitalDataConfig::tLastKnownGoodPositionIfc>::Get() const { if(m_Ifc.GetLastKnownGoodPositionFn) { return m_Ifc.GetLastKnownGoodPositionFn(); } return m_Config(); }
void TLConfig::OnBnClickedBrightmodelpath() { CFileOper foper; m_RightModelPath = foper.PathSelect(L"Data Files|*.txt||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); if (m_RightModelPath != "") { m_Config.LoadParam(); m_Config.SetTLRightModel(m_RightModelPath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void TLConfig::OnBnClickedBtlmodulepath() { CFileOper foper; m_TLModulePath = foper.PathSelect(L"Data Files|*.dll||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); if (m_TLModulePath != "") { m_Config.LoadParam(); m_Config.SetTLModule(m_TLModulePath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void TLConfig::OnBnClickedBbothtlparampath() { CFileOper foper; m_BothTLParamPath = foper.PathSelect(L"Data Files|*.txt||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); if (m_BothTLParamPath != "") { m_Config.LoadParam(); m_Config.SetTLBothParamPath(m_BothTLParamPath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void LeftRightBothConfig::OnBnClickedBmodulepath() { CFileOper foper; m_ModulePath = foper.PathSelect(L"Data Files|*.dll||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); if (m_ModulePath != "") { m_Config.LoadParam(); m_Config.SetClassifyModule(m_ModulePath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void PublicConfig::SaveFile() { Stringoper oper; double a, b; GetDlgItemText(IDC_EWindowLength, m_WindowLength); GetDlgItemText(IDC_ELeftThreshold,m_LeftThreshold); GetDlgItemText(IDC_ERightThreshold, m_RightThreshold); GetDlgItemText(IDC_EOverLappedWinLen, m_OverLappedWinLen); CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); a = oper.stringtodouble(oper.tostring(m_LeftThreshold)); b = oper.stringtodouble(oper.tostring(m_RightThreshold)); m_Config.SetOverLength(oper.stringtoint(oper.tostring(m_OverLappedWinLen))); m_Config.SetWindowLength(oper.stringtoint(oper.tostring(m_WindowLength))); m_Config.SetLRThrolds(a, b); m_Config.SaveParam(); }
void TLConfig::OnBnClickedBlefttldatapath() { CFileOper foper; m_LeftTLDataPath = foper.PathSelect(L"Data Files|*.dat||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); /*若搜索到.dat文件,将该文件的路径值写回配置文件Config.txt*/ if (m_LeftTLDataPath != "") { m_Config.LoadParam(); m_Config.SetTLLeftData(m_LeftTLDataPath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void BiteThresholdConfig::OnBnClickedBbitethroldpath() { CFileOper foper; m_biteThresholdPath = foper.PathSelect(L"Data Files|*.txt||"); Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); if (m_biteThresholdPath != "") { m_Config.LoadParam(); m_Config.SetBiteThorldModel(m_biteThresholdPath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
BOOL PublicConfig::OnInitDialog() { Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); /*从配置文件Config.txt读取各参数的默认值*/ m_WindowLength = oper.tocstring(oper.inttostring(m_Config.GetWindowLength())); m_OverLappedWinLen = oper.tocstring(oper.inttostring(m_Config.GetOverLength())); double a, b; m_Config.GetLRThrolds(a, b); m_LeftThreshold = oper.tocstring(oper.doubletostring(a)); m_RightThreshold = oper.tocstring(oper.doubletostring(b)); m_Config.CloseParmFile(); UPDATAVALTOCONTROL; return true; }
void BiteThresholdConfig::SaveFile() { Stringoper oper; int time, count; GetDlgItemText(IDC_EBiteTrainTime, m_biteTrainTime); GetDlgItemText(IDC_EBiteCount, m_biteCount); //add CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); time = oper.stringtoint(oper.tostring(m_biteTrainTime)); count = oper.stringtoint(oper.tostring(m_biteCount)); m_Config.SetBiteTrain(time, count); if (((CButton*)GetDlgItem(IDC_RBiteTrain))->GetCheck()) m_Config.SetBiteState(1); if (((CButton*)GetDlgItem(IDC_RBiteNotTrain))->GetCheck()) m_Config.SetBiteState(0); m_Config.SaveParam(); }
void BiteThresholdConfig::OnBnClickedBitedatapath() { CFileOper foper; m_biteDataPath = foper.PathSelect(L"Data Files|*.dat||"); //搜索目录寻找.dat文件 Stringoper oper; CAlgParamConfig m_Config(m_ConfigPath); /*若搜索到.dat文件,将该文件的路径值写回配置文件Config.txt*/ if (m_biteDataPath != "") { m_Config.LoadParam(); m_Config.SetBiteDataPath(m_biteDataPath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
void BiteThresholdConfig::OnBnClickedBbitethroldmodulepath() { Stringoper oper; CFileOper foper; m_biteThroldModulePath = foper.PathSelect(L"Data Files|*.dll||"); CAlgParamConfig m_Config(m_ConfigPath); /*若搜索到.dll文件,将该文件的路径值写回配置文件Config.txt*/ if (m_biteThroldModulePath != "") { m_Config.LoadParam(); m_Config.SetBiteModulePath(m_biteThroldModulePath); m_Config.SaveParam(); UPDATAVALTOCONTROL; } }
BOOL TLConfig::OnInitDialog() { Stringoper soper; Streamoper oper; CAlgParamConfig m_Config(m_ConfigPath); m_Config.LoadParam(); /*从配置文件Config.txt读取各参数的默认值*/ vector<int> TLTrainTime; m_TwoBiteTrainTime = L""; m_Config.GetTLTrainTime(TLTrainTime); for (size_t i = 0; i < TLTrainTime.size(); i++) { m_TwoBiteTrainTime += soper.tocstring(soper.inttostring(TLTrainTime[i])) + L" "; } m_LeftTLParamPath = m_Config.GetTLLeftParamPath(); m_LeftTLDataPath = m_Config.GetTLLeftData(); m_BothTLParamPath = m_Config.GetTLBothParamPath(); m_BothTLDataPath = m_Config.GetTLBothData(); m_RightTLParamPath = m_Config.GetTLRightParamPath(); m_RightTLDataPath = m_Config.GetTLRightData(); m_LeftModelPath = m_Config.GetTLLeftModel(); m_BothModelPath = m_Config.GetTLBothModel(); m_RightModelPath = m_Config.GetTLRightModel(); m_TLModulePath = m_Config.GetTLModule(); if (m_Config.GetTLTrainState() == 1) ((CButton*)GetDlgItem(IDC_RTLTrain))->SetCheck(1); else ((CButton*)GetDlgItem(IDC_RTLNoTrain))->SetCheck(1); if (m_Config.GetTLReTrain() == 1) ((CButton*)GetDlgItem(IDC_RTLReTrain))->SetCheck(1); else ((CButton*)GetDlgItem(IDC_RTLNoReTrain))->SetCheck(1); m_Config.CloseParmFile(); UPDATAVALTOCONTROL; return true; }