void CConfigFileHandler::ReadTStatPageConfig( CString& strHexFileName, CString& strFlashMethod, CString& strFlashTypePage, CString& strModbusID, CString& strComPort, CString& strBaudrate) { ASSERT(m_pFile); { ReadFromCfgFile(); strHexFileName = m_szCfgFile[CV_TstatLastFlashFile]; strFlashMethod = m_szCfgFile[CV_TstatLastFlashMethod]; strFlashTypePage = m_szCfgFile[CV_TstatLastFlashPage]; strModbusID = m_szCfgFile[CV_TstatDeAddr]; strComPort = m_szCfgFile[CV_TstatDeCOM]; strBaudrate = m_szCfgFile[CV_TstatDeBaudrate]; // strIP = m_szCfgFile[8]; // strIPPort = m_szCfgFile[9]; // 取有效数据 TCHAR c = ':'; strHexFileName = strHexFileName.Mid(strHexFileName.Find(c)+2); strFlashMethod = strFlashMethod.Mid(strFlashMethod.Find(c)+2); strFlashTypePage = strFlashTypePage.Mid(strFlashTypePage.Find(c)+2); strModbusID = strModbusID.Mid(strModbusID.Find(c)+2); strComPort = strComPort.Mid(strComPort.Find(c)+2); strBaudrate = strBaudrate.Mid(strBaudrate.Find(c)+2); // strIP = strIP.Mid(strIP.Find(c)+2); // strIPPort = strIPPort.Mid(strIPPort.Find(c)+2); } }
void CConfigFileHandler::ReadNCPageConfig( CString& strFlashFileName, CString& strFlashType, CString& strIP, CString& strIPPort) { ASSERT(m_pFile); ReadFromCfgFile(); strFlashFileName = m_szCfgFile[CV_NCLastFlashFile]; strFlashType = m_szCfgFile[CV_NCLastFlashMethod]; strIP = m_szCfgFile[CV_NCDeIP]; strIPPort = m_szCfgFile[CV_NCDeIPPort]; // 取有效数据 TCHAR c = ':'; strFlashFileName = strFlashFileName.Mid(strFlashFileName.Find(c)+2); strFlashType = strFlashType.Mid(strFlashType.Find(c)+2); strIP = strIP.Mid(strIP.Find(c)+2); strIPPort = strIPPort.Mid(strIPPort.Find(c)+2); }
void CConfigFileHandler::ReadFromCfgFileForAll( CString& HexFileName, CString& FlashMethod, CString& DeviceID, CString& COMPORT, CString& BD, CString& IP, CString& IPPort, CString& subnote, CString& subID) { ASSERT(m_pFile); ReadFromCfgFile(); HexFileName = m_szCfgFile[CV_TstatLastFlashFile]; FlashMethod = m_szCfgFile[CV_TstatLastFlashMethod]; DeviceID = m_szCfgFile[CV_TstatDeAddr]; COMPORT = m_szCfgFile[CV_TstatDeCOM]; BD = m_szCfgFile[CV_TstatDeBaudrate]; IP=m_szCfgFile[CV_NCDeIP]; IPPort=m_szCfgFile[CV_NCDeIPPort]; //subnote = m_szCfgFile[CV_SubNot]; //subID = m_szCfgFile[CV_Sub_ID]; // 取有效数据 TCHAR c = ':'; HexFileName=HexFileName.Mid(HexFileName.Find(c)+2); FlashMethod=FlashMethod.Mid(FlashMethod.Find(c)+2); DeviceID=DeviceID.Mid(DeviceID.Find(c)+2); COMPORT=COMPORT.Mid(COMPORT.Find(c)+2); BD=BD.Mid(BD.Find(c)+2); IP=IP.Mid(IP.Find(c)+2); IPPort=IPPort.Mid(IPPort.Find(c)+2); //subnote = subnote.Mid(subnote.Find(c)+2); //subID = subID.Mid(subID.Find(c)+2); }