/// <summary> /// Click Event for switching the entree of the combo to Philly Poacher and switches to its customization screen /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void PhillyPoacherClick(object sender, RoutedEventArgs e) { if (DataContext is Order order) { PhillyPoacher php = new PhillyPoacher(); combo.Entree = php; CustomizePhillyPoacher temp = new CustomizePhillyPoacher(menu, php, order, combo); temp.doneButton.IsEnabled = false; temp.cancelButton.IsEnabled = false; menu.orderBorder.Child = temp; } }
/// <summary> /// Click event to add a Philly Poacher to the current order /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void PhillyPoacherClick(object sender, RoutedEventArgs e) { PhillyPoacher pp = new PhillyPoacher(); Combo temp = new Combo(null, null, null); if (DataContext is Order order) { order.Add(pp); CustomizePhillyPoacher newScreen = new CustomizePhillyPoacher(menu, pp, order, temp); newScreen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = newScreen; } }
/// <summary> /// Click event to edit an existing item in the current order /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void EditExistingItem(object sender, RoutedEventArgs e) { if (DataContext is Order order) { Combo temp = new Combo(null, null, null); var currentItem = ((Button)sender).DataContext; if (currentItem is BriarheartBurger bb) { CustomizeBriarheartBurger screen = new CustomizeBriarheartBurger(menu, bb, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is DoubleDraugr dd) { CustomizeDoubleDraugr screen = new CustomizeDoubleDraugr(menu, dd, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is GardenOrcOmelette goo) { CustomizeGardenOrcOmelette screen = new CustomizeGardenOrcOmelette(menu, goo, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is PhillyPoacher php) { CustomizePhillyPoacher screen = new CustomizePhillyPoacher(menu, php, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is SmokehouseSkeleton sks) { CustomizeSmokehouseSkeleton screen = new CustomizeSmokehouseSkeleton(menu, sks, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is ThalmorTriple tt) { CustomizeThalmorTriple screen = new CustomizeThalmorTriple(menu, tt, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is ThugsTBone ttb) { CustomizeThugsTBone screen = new CustomizeThugsTBone(menu, ttb, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is AretinoAppleJuice aj) { CustomizeAretinoAppleJuice screen = new CustomizeAretinoAppleJuice(menu, aj, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is CandlehearthCoffee chc) { CustomizeCandlehearthCoffee screen = new CustomizeCandlehearthCoffee(menu, chc, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is MarkarthMilk mm) { CustomizeMarkarthMilk screen = new CustomizeMarkarthMilk(menu, mm, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is SailorSoda ss) { CustomizeSailorSoda screen = new CustomizeSailorSoda(menu, ss, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is WarriorWater ww) { CustomizeWarriorWater screen = new CustomizeWarriorWater(menu, ww, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is DragonbornWaffleFries dwf) { CustomizeDragonbornWaffleFries screen = new CustomizeDragonbornWaffleFries(menu, dwf, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is FriedMiraak fm) { CustomizeFriedMiraak screen = new CustomizeFriedMiraak(menu, fm, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is MadOtarGrits mog) { CustomizeMadOtarGrits screen = new CustomizeMadOtarGrits(menu, mog, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } else if (currentItem is VokunSalad vs) { CustomizeVokunSalad screen = new CustomizeVokunSalad(menu, vs, order, temp); screen.returnToOrderbutton.IsEnabled = false; menu.orderBorder.Child = screen; } //Combo else if (currentItem is Combo c) { menu.orderBorder.Child = new ComboControl(menu, c, order); } } }