/// <summary>
 /// 返回配置类实例
 /// </summary>
 /// <returns></returns>
 public static GeneralConfigInfo LoadConfig()
 {
     try
     {
         ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo, true);
     }
     catch
     {
         ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo, true);
     }
     return(ConfigInfo as GeneralConfigInfo);
 }
Exemple #2
0
        /// <summary>
        /// 初始化文件修改时间和对象实例
        /// </summary>
        static PhotoConfigFileManager()
        {
            m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);

            try
            {
                m_PhotoConfigInfo = (PhotoConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(PhotoConfigInfo));
            }
            catch
            {
                if (File.Exists(ConfigFilePath))
                {
                    m_PhotoConfigInfo = (PhotoConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(PhotoConfigInfo));
                }
            }
        }
Exemple #3
0
 /// <summary>
 /// 返回配置类实例
 /// </summary>
 /// <returns></returns>
 public static EmailConfigInfo LoadConfig()
 {
     ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo);
     return(ConfigInfo as EmailConfigInfo);
 }
Exemple #4
0
 /// <summary>
 /// 初始化文件修改时间和对象实例
 /// </summary>
 static EmailConfigFileManager()
 {
     m_fileoldchange = System.IO.File.GetLastWriteTime(ConfigFilePath);
     m_configinfo    = (EmailConfigInfo)DefaultConfigFileManager.DeserializeInfo(ConfigFilePath, typeof(EmailConfigInfo));
 }
 /// <summary>
 /// 返回配置类实例
 /// </summary>
 /// <returns></returns>
 public static ScheduleConfigInfo LoadConfig()
 {
     ConfigInfo = DefaultConfigFileManager.LoadConfig(ref m_fileoldchange, ConfigFilePath, ConfigInfo, true);
     return(ConfigInfo as ScheduleConfigInfo);
 }