示例#1
0
        /// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <returns></returns>
        public static bool SaveConfig(AggregationConfigInfo aggregationconfiginfo)
        {
            AggregationConfigFileManager acfm = new AggregationConfigFileManager();

            AggregationConfigFileManager.ConfigInfo = aggregationconfiginfo;
            return(acfm.SaveConfig());
        }
示例#2
0
        /// <summary>
        /// 静态构造函数初始化相应实例和定时器
        /// </summary>
        static AggregationConfig()
        {
            m_configinfo = AggregationConfigFileManager.LoadConfig();

            aggregationConfigTimer.AutoReset = true;
            aggregationConfigTimer.Enabled = true;
            aggregationConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
            aggregationConfigTimer.Start();
        }
示例#3
0
        /// <summary>
        /// 静态构造函数初始化相应实例和定时器
        /// </summary>
        static AggregationConfig()
        {
            m_configinfo = AggregationConfigFileManager.LoadConfig();

            aggregationConfigTimer.AutoReset = true;
            aggregationConfigTimer.Enabled   = true;
            aggregationConfigTimer.Elapsed  += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
            aggregationConfigTimer.Start();
        }
示例#4
0
 /// <summary>
 /// 保存配置类实例
 /// </summary>
 /// <returns></returns>
 public static bool SaveConfig(AggregationConfigInfo aggregationconfiginfo)
 {
     AggregationConfigFileManager acfm = new AggregationConfigFileManager();
     AggregationConfigFileManager.ConfigInfo = aggregationconfiginfo;
     return acfm.SaveConfig();
 }
示例#5
0
 /// <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));
 }
示例#7
0
 /// <summary>
 /// 初始化文件修改时间和对象实例
 /// </summary>
 static AggregationConfigFileManager()
 {
     m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);
     m_configinfo    = (AggregationConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(AggregationConfigInfo));
 }
示例#8
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configinfo = AggregationConfigFileManager.LoadConfig();
 }