/// <summary> /// 현재 설치된 WeDo Server가 있는지 확인한다. /// 확인방법: backup config 파일 /// </summary> /// <returns></returns> public bool prevWeDoExists() { Logger.info("CheckPrevWeDoExists"); bool result = false; try { if (!configFileHandler.PrevConfigExists()) { Logger.info("WeDo 미설치상태"); } else { Logger.info("WeDo 설치상태"); companyCd = configFileHandler.BackupCompanyCd(); companyName = configFileHandler.BackupCompanyName(); msgrPort = Convert.ToInt16(configFileHandler.GetValue("MSGR_PORT")); crmPort = Convert.ToInt16(configFileHandler.GetValue("CRM_PORT")); Logger.info(string.Format("백업된 회사정보:{0}[{1}]", companyName, companyCd)); result = true; } } catch (Exception e) { Logger.error("WeDo 미설치상태"); result = false; } return(result); }
public bool LoadData() { bool result = false; try { crmPort = Convert.ToInt16(configFileHandler.GetValue("CRM_PORT")); OnWriteLog(string.Format("CRM_PORT => [{0}] 초기화", crmPort)); msgrPort = Convert.ToInt16(configFileHandler.GetValue("MSGR_PORT")); OnWriteLog(string.Format("MSGR_PORT => [{0}] 초기화", msgrPort)); dbServerIp = configFileHandler.GetValue("DB_HOST"); OnWriteLog(string.Format("DB_HOST => [{0}] 초기화", dbServerIp)); dbPort = Convert.ToInt16(configFileHandler.GetValue("DB_PORT")); OnWriteLog(string.Format("DB_PORT => [{0}] 초기화", dbPort)); companyCode = configFileHandler.GetValue("COM_CODE"); OnWriteLog(string.Format("COM_CODE => [{0}] 초기화", companyCode)); serverType = configFileHandler.GetValue("SVR_TYPE"); OnWriteLog(string.Format("SVR_TYPE => [{0}] 초기화", serverType)); device = configFileHandler.GetValue("DEVICE"); OnWriteLog(string.Format("DEVICE => [{0}] 초기화", device)); autoStart = (configFileHandler.GetValue("AUTO_START").Equals(ConstDef.TRUE)); OnWriteLog(string.Format("AUTO_START => [{0}] 초기화", autoStart)); result = true; } catch (Exception ex) { Logger.error(ex.ToString()); } return(result); }
public static void Initialize() { configFileHandler = new ConfigFileHandler(ConstDef.WEDO_MSGR_DIR, ConstDef.WEDO_CLIENT_EXE); serverIp = configFileHandler.GetValue("ServerIp"); socketPortCrm = Convert.ToInt16(configFileHandler.GetValue("SocketPortCrm")); socketPortFtp = Convert.ToInt16(configFileHandler.GetValue("SocketPortFtp")); socketPortMsgr = Convert.ToInt16(configFileHandler.GetValue("SocketPortMsgr")); id = configFileHandler.GetValue("MyId"); extension = configFileHandler.GetValue("PhoneExtension"); pass = configFileHandler.GetValue("MyPass"); customColor = configFileHandler.GetValue("CustomColor"); customFont = configFileHandler.GetValue("CustomFont"); savePass = (configFileHandler.GetValue("SaveMyPass").Equals(CommonDef.TRUE)); noPopOutBound = (configFileHandler.GetValue("NoPopUpOnCallOutBound").Equals(CommonDef.TRUE)); topMost = (configFileHandler.GetValue("TopMost").Equals(CommonDef.TRUE)); noPop = (configFileHandler.GetValue("NoPopUpOnCall").Equals(CommonDef.TRUE)); autoStart = (configFileHandler.GetValue("AutoStart").Equals(CommonDef.TRUE)); dbServerIp = configFileHandler.GetValue("DbServerIp"); dbPort = Convert.ToInt16(configFileHandler.GetValue("DbPort")); promotionUrl = configFileHandler.GetValue("PromotionUrl"); }