/// <summary> /// Selects a specific game for which to view the store. /// </summary> /// <param name="game">The selected game.</param> public void SelectGame(Game game) { // Deselect current game this.IsCheatListLoading = true; this.LockedCheatList = null; this.UnlockedCheatList = null; Task.Run(() => { try { // Select new game AccessTokens accessTokens = SettingsViewModel.GetInstance().AccessTokens; StoreCheats storeCheats = SqualrApi.GetStoreCheats(accessTokens.AccessToken, game.GameId); this.LockedCheatList = new FullyObservableCollection <Cheat>(storeCheats.LockedCheats); this.UnlockedCheatList = new FullyObservableCollection <Cheat>(storeCheats.UnlockedCheats); } catch (Exception ex) { OutputViewModel.GetInstance().Log(OutputViewModel.LogLevel.Error, "Error loading cheats", ex); BrowseViewModel.GetInstance().NavigateBack(); } finally { this.IsCheatListLoading = false; } }); }