Example #1
0
 /// <summary>
 /// 保存应用程序配置文件
 /// </summary>
 /// <param name="Path"></param>
 public void SaveAppConfig(string path)
 {
     if (AppConfig != null)
     {
         AppConfig.Serialize(path);
     }
     else
     {
         AppConfig = new ClientAppConfig();
         AppConfig.Serialize(path);
     }
 }
Example #2
0
 /// <summary>
 /// 加载应用程序配置文件
 /// </summary>
 /// <param name="Path"></param>
 public void LoadAppConfig(string path)
 {
     if (File.Exists(path))
     {
         AppConfig = new ClientAppConfig();
         AppConfig = (ClientAppConfig)AppConfig.Deserialize(path);
     }
     else
     {
         AppConfig = new ClientAppConfig();
         AppConfig.Serialize(path);
     }
 }