/// <summary> /// 读取配置文件数据 /// </summary> public static void ReadConfig() { DateTime start = DateTime.Now; userProfile.ReadConfig(); orgConfig.ReadConfig(); DTU_StationConfig.ReadConfig(); DBCJconfig.ReadConfig(); clientConfig.ReadConfig(); GD_Config.GenerateConfig(); V88CommunicationThread.getInstance().readConfig(); DateTime end = DateTime.Now; LogMg.AddInfo(DateUtil.datediff(start, end)); }
private void dbToXML() { DateTime start = DateTime.Now; LogMg.AddDebug("准备开始从数据库生成站点和检测点配置"); //if (SysConfig.DTU_StationConfig.GenerateFromDbToXML() == true) if (SysConfig.DTU_StationConfig.GenerateFromDbToXML() == true && SysConfig.GD_Config.GenerateConfig() == true) { LogMg.AddDebug("从数据库生成站点和检测点配置到XML成功"); //MessageBox.Show(""); SysConfig.ReadConfig(); DTU_ClientManager.Update(); BeginInvoke(new Action <String>(showMessageBox), "已成功从数据库生成配置"); } else { LogMg.AddDebug("从数据库生成站点和检测点配置失败"); BeginInvoke(new Action <String>(showMessageBox), "从数据库生成站点和检测点配置失败,请查看日志文件"); } DateTime end = DateTime.Now; LogMg.AddInfo("生成xml并读取配置到内存耗时:" + DateUtil.datediff(start, end)); }