/// <summary> /// Method that adds a game to the shopping cart and updates it /// </summary> public void AddGame() { _shoppingCart.AddGame(SelectedGame); OnPropertyChanged(nameof(Games)); OnPropertyChanged(nameof(TotalPrice)); OnPropertyChanged(nameof(IsCheckoutEnabled)); }
private void BuyGameButton_OnClick(object sender, RoutedEventArgs e) { _shoppingCart.AddGame(_gameList.SelectedGame); }
/// <summary> /// Adds SelectedGame to the shopping cart, then refreshes it in the mainpage. /// </summary> public void PurchaseSelectedGame() { _shoppingCart.AddGame(SelectedGame); _shoppingCart.MainPageVm.RefreshPurchaseSelectedGame(); }