示例#1
0
 private void LoadOrCreateConfig()
 {
     if (File.Exists(CONFIG_FILE))
     {
         try
         {
             Config = SerializationHelper.Deserialize<Config>(File.ReadAllText(CONFIG_FILE));
         }
         catch (Exception ex)
         {
             CreateNewConfig();
         }
     }
     else
         CreateNewConfig();
 }
        public GamesViewModel(ConfigService configService, PatchService patchService)
        {
            this._patchService = patchService;

            _config = configService.Config;
        }
示例#3
0
 private void CreateNewConfig()
 {
     Config = new Config();
     Persist();
 }