/// <summary>
        /// 保存配置类实例
        /// </summary>
        /// <returns></returns>
        public static bool SaveConfig(DiscuzCloudConfigInfo discuzCloudConfigInfo)
        {
            DiscuzCloudConfigFileManager dcfm = new DiscuzCloudConfigFileManager();

            DiscuzCloudConfigFileManager.ConfigInfo = discuzCloudConfigInfo;
            return(dcfm.SaveConfig());
        }
        static DiscuzCloudConfigFileManager()
        {
            if (!Utils.FileExists(ConfigFilePath))
                SerializationHelper.Save(DiscuzCloudConfigInfo.CreateInstance(), ConfigFilePath);

            m_fileOldChange = System.IO.File.GetLastWriteTime(ConfigFilePath);
            m_configInfo = (DiscuzCloudConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(DiscuzCloudConfigInfo));
        }
        static DiscuzCloudConfigs()
        {
            m_configInfo = DiscuzCloudConfigFileManager.LoadConfig();

            cloudConfigTimer.AutoReset = true;
            cloudConfigTimer.Enabled   = true;
            cloudConfigTimer.Elapsed  += new System.Timers.ElapsedEventHandler(Time_Elapsed);
            cloudConfigTimer.Start();
        }
Example #4
0
        static DiscuzCloudConfigFileManager()
        {
            if (!Utils.FileExists(ConfigFilePath))
            {
                SerializationHelper.Save(DiscuzCloudConfigInfo.CreateInstance(), ConfigFilePath);
            }

            m_fileOldChange = System.IO.File.GetLastWriteTime(ConfigFilePath);
            m_configInfo    = (DiscuzCloudConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(DiscuzCloudConfigInfo));
        }
Example #5
0
        static DiscuzCloudConfigs()
        {
            m_configInfo = DiscuzCloudConfigFileManager.LoadConfig();

            cloudConfigTimer.AutoReset = true;
            cloudConfigTimer.Enabled = true;
            cloudConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Time_Elapsed);
            cloudConfigTimer.Start();

        }
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configInfo = DiscuzCloudConfigFileManager.LoadConfig();
 }
Example #7
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configInfo = DiscuzCloudConfigFileManager.LoadConfig();
 }
Example #8
0
 /// <summary>
 /// 保存配置类实例
 /// </summary>
 /// <returns></returns>
 public static bool SaveConfig(DiscuzCloudConfigInfo discuzCloudConfigInfo)
 {
     DiscuzCloudConfigFileManager dcfm = new DiscuzCloudConfigFileManager();
     DiscuzCloudConfigFileManager.ConfigInfo = discuzCloudConfigInfo;
     return dcfm.SaveConfig();
 }