Пример #1
0
        /// <summary>
        /// ��̬���캯����ʼ����Ӧʵ���Ͷ�ʱ��
        /// </summary>
        static BaseConfigs()
        {
            _configinfo = BaseConfigFileManager.LoadConfig();

            _baseConfigTimer.AutoReset = true;
            _baseConfigTimer.Enabled = true;
            _baseConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
        }
Пример #2
0
        static BaseConfigFileManager()
        {
            _fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);

            _configinfo = (BaseConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(BaseConfigInfo));

            _configinfo.Dbconnectstring = Sjs.Common.DES.Decode(_configinfo.Dbconnectstring, "sjscanpvvvfb");
        }
Пример #3
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     _configinfo = BaseConfigFileManager.LoadRealConfig();
 }
Пример #4
0
        /// <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();
        }
Пример #5
0
 /// <summary>
 /// ����������ʵ��
 /// </summary>
 public static void ResetConfig()
 {
     _configinfo = BaseConfigFileManager.LoadRealConfig();
 }