예제 #1
0
 /// <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));
 }
예제 #2
0
 private void BuyGameButton_OnClick(object sender, RoutedEventArgs e)
 {
     _shoppingCart.AddGame(_gameList.SelectedGame);
 }
예제 #3
0
 /// <summary>
 /// Adds SelectedGame to the shopping cart, then refreshes it in the mainpage.
 /// </summary>
 public void PurchaseSelectedGame()
 {
     _shoppingCart.AddGame(SelectedGame);
     _shoppingCart.MainPageVm.RefreshPurchaseSelectedGame();
 }