Ejemplo n.º 1
0
 /// <summary>
 /// 读取配置信息
 /// </summary>
 /// <returns></returns>
 public bool ReadConfig()
 {
     try
     {
         var path = AppDomain.CurrentDomain.BaseDirectory + "SettingConfig.xml";
         if (!File.Exists(path))
         {
             Log.WriteLog4("配置文件不存在,已加载默认配置");
             return(false);
         }
         Config = SerializableHelper.DeserializeSetting <ConfigModel>(path);
         return(true);
     }
     catch (Exception ex)
     {
         Log.WriteLog4("ReadConfig:" + ex.ToString(), LOGTYPE.ERRORD);
         return(false);
     }
 }