/// <summary> /// ��̬���캯����ʼ����Ӧʵ���Ͷ�ʱ�� /// </summary> static BaseConfigs() { _configinfo = BaseConfigFileManager.LoadConfig(); _baseConfigTimer.AutoReset = true; _baseConfigTimer.Enabled = true; _baseConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed); }
static BaseConfigFileManager() { _fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath); _configinfo = (BaseConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(BaseConfigInfo)); _configinfo.Dbconnectstring = Sjs.Common.DES.Decode(_configinfo.Dbconnectstring, "sjscanpvvvfb"); }
/// <summary> /// 重设配置类实例 /// </summary> public static void ResetConfig() { _configinfo = BaseConfigFileManager.LoadRealConfig(); }
/// <summary> /// �������� /// </summary> /// <param name="baseconfiginfo"></param> /// <returns></returns> public static bool SaveConfig(BaseConfigInfo baseconfiginfo) { BaseConfigFileManager bcfm = new BaseConfigFileManager(); // ���� baseconfiginfo.Dbconnectstring = Sjs.Common.DES.Encode(baseconfiginfo.Dbconnectstring, "sjscanpvvvfb"); BaseConfigFileManager.ConfigInfo = baseconfiginfo; return bcfm.SaveConfig(); }
/// <summary> /// ����������ʵ�� /// </summary> public static void ResetConfig() { _configinfo = BaseConfigFileManager.LoadRealConfig(); }