예제 #1
0
        /// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <param name="generalConfigInfo"></param>
        /// <returns></returns>
        public static bool SaveConfig(GeneralConfigInfo generalConfigInfo)
        {
            GeneralConfigFileManager generalManger = new GeneralConfigFileManager();

            GeneralConfigFileManager.ConfigInfo = generalConfigInfo;
            return(generalManger.SaveConfig());
        }
예제 #2
0
        /// <summary>
        /// 静态构造函数初始化相应实例和定时器
        /// </summary>
        static GeneralConfigs()
        {
            m_configinfo = GeneralConfigFileManager.LoadConfig();

            generalConfigTimer.AutoReset = true;
            generalConfigTimer.Enabled   = true;
            generalConfigTimer.Elapsed  += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
            generalConfigTimer.Start();
        }
예제 #3
0
 /// <summary>
 /// 保存配置类实例
 /// </summary>
 /// <param name="generalConfigInfo"></param>
 /// <returns></returns>
 public static bool SaveConfig(GeneralConfigInfo generalConfigInfo)
 {
     GeneralConfigFileManager generalManger = new GeneralConfigFileManager();
     GeneralConfigFileManager.ConfigInfo = generalConfigInfo;
     return generalManger.SaveConfig();
 }
예제 #4
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configinfo = GeneralConfigFileManager.LoadConfig();
 }