コード例 #1
0
 /// <summary>
 /// 序列化配置信息为XML
 /// </summary>
 /// <param name="configinfo">配置信息</param>
 /// <param name="configFilePath">配置文件完整路径</param>
 public static MyAttachmentsTypeConfigInfo Serialiaze(MyAttachmentsTypeConfigInfo configinfo, string configFilePath)
 {
     lock (lockHelper)
     {
         SerializationHelper.Save(configinfo, configFilePath);
     }
     return configinfo;
 }
コード例 #2
0
        /// <summary>
        /// 静态构造函数初始化相应实例和定时器
        /// </summary>
        static MyAttachmentsTypeConfigs()
        {
            m_configinfo = MyAttachmentsTypeConfigFileManager.LoadConfig();

            generalConfigTimer.AutoReset = true;
            generalConfigTimer.Enabled = true;
            generalConfigTimer.Elapsed += new System.Timers.ElapsedEventHandler(Timer_Elapsed);
            generalConfigTimer.Start();
        }
コード例 #3
0
 /// <summary>
 /// 重设配置类实例
 /// </summary>
 public static void ResetConfig()
 {
     m_configinfo = MyAttachmentsTypeConfigFileManager.LoadConfig();
 }