/// <summary> /// Mac Button click /// </summary> /// <param name="sender">Object sending</param> /// <param name="e">Routed Event Argument</param> private void MacSelect(object sender, RoutedEventArgs e) { mac.Background = new SolidColorBrush(Color.FromRgb(173, 216, 230)); fries.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); moz.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); tot.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); if (DataContext is Order order) { side = new MeteorMacAndCheese(); //order.Items.Add(side); if (combo == null) { order.Add(side); } else { combo.Side = side; } } }
/// <summary> /// Fry Button click /// </summary> /// <param name="sender">Object sending</param> /// <param name="e">Routed Event Argument</param> private void FrySelect(object sender, RoutedEventArgs e) { fries.Background = new SolidColorBrush(Color.FromRgb(173, 216, 230)); mac.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); moz.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); tot.Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)); if (DataContext is Order order) { side = new Fryceritops(); if (combo == null) { order.Add(side); } else { combo.Side = side; } //order.Items.Add(side); } }
/// <summary> /// Constructor for entree drink and side combo /// </summary> /// <param name="entree">Chosen Entree</param> /// <param name="side">Chosen Side</param> /// <param name="drink">Chosen Drink</param> public CretaceousCombo(Entree entree, Side side, Drink drink) { this.Entree = entree; this.Side = side; this.Drink = drink; }
/// <summary> /// Constructor for the combo. /// </summary> /// <param name="entree"></param> public CretaceousCombo(Entree entree) { Entree = entree; Side = new Fryceritops(); Drink = new Sodasaurus(); }