/// <summary> /// 保存配置类实例 /// </summary> /// <returns></returns> public static bool SaveConfig(AggregationConfigInfo aggregationconfiginfo) { AggregationConfigFileManager acfm = new AggregationConfigFileManager(); AggregationConfigFileManager.ConfigInfo = aggregationconfiginfo; return(acfm.SaveConfig()); }
/// <summary> /// 静态构造函数初始化相应实例和定时器 /// </summary> static AggregationConfig() { m_configinfo = AggregationConfigFileManager.LoadConfig(); aggregationConfigTimer.AutoReset = true; aggregationConfigTimer.Enabled = true; aggregationConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed); aggregationConfigTimer.Start(); }
/// <summary> /// 保存配置类实例 /// </summary> /// <returns></returns> public static bool SaveConfig(AggregationConfigInfo aggregationconfiginfo) { AggregationConfigFileManager acfm = new AggregationConfigFileManager(); AggregationConfigFileManager.ConfigInfo = aggregationconfiginfo; return acfm.SaveConfig(); }
/// <summary> /// 重设配置类实例 /// </summary> public static void ResetConfig() { m_configinfo = AggregationConfigFileManager.LoadConfig(); }
/// <summary> /// 初始化文件修改时间和对象实例 /// </summary> static AggregationConfigFileManager() { m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); m_configinfo = (AggregationConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(AggregationConfigInfo)); }