예제 #1
0
        /// <summary>
        /// 保存配置实例
        /// </summary>
        /// <param name="baseconfiginfo"></param>
        /// <returns></returns>
        public static bool SaveConfig(DbSnapAppConfig baseconfiginfo)
        {
            DbSnapConfigFileManager dbscfm = new DbSnapConfigFileManager();

            DbSnapConfigFileManager.ConfigInfo = baseconfiginfo;
            return(dbscfm.SaveConfig());
        }
예제 #2
0
        /// <summary>
        /// 静态构造函数初始化相应实例和定时器
        /// </summary>
        static DbSnapConfigs()
        {
            m_dbSnapAppConfig = DbSnapConfigFileManager.LoadConfig();

            dbSnapConfigTimer.AutoReset = true;
            dbSnapConfigTimer.Enabled   = true;
            dbSnapConfigTimer.Elapsed  += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
            dbSnapConfigTimer.Start();
        }
예제 #3
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_dbSnapAppConfig = DbSnapConfigFileManager.LoadConfig();
     enableSnapList    = null;
 }
예제 #4
0
   /// <summary>
 /// 保存配置实例
 /// </summary>
 /// <param name="baseconfiginfo"></param>
 /// <returns></returns>
 public static bool SaveConfig(DbSnapAppConfig baseconfiginfo)
 {
     DbSnapConfigFileManager dbscfm = new DbSnapConfigFileManager();
     DbSnapConfigFileManager.ConfigInfo = baseconfiginfo;
     return dbscfm.SaveConfig();
 }