void ClickComboButton(object sender, RoutedEventArgs e) { if (DataContext is Order order) { ComboMeal c = new ComboMeal(); order.Add(c); CustomizeComboMeal customizeCombo = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(customizeCombo); } }
void ClickDone(object sender, RoutedEventArgs e) { if (IsCombo) { CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else { SelectEntrees custom = new SelectEntrees(); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddBriarheartBurger(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new BriarheartBurger(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { BriarheartBurger b = new BriarheartBurger(); order.Add(b); CustomizeBriarheartBurger custom = new CustomizeBriarheartBurger(b, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddPhillyPoacher(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new PhillyPoacher(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { PhillyPoacher p = new PhillyPoacher(); order.Add(p); CustomizePhillyPoacher custom = new CustomizePhillyPoacher(p, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddGardenOrcOmelette(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new GardenOrcOmelette(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { GardenOrcOmelette g = new GardenOrcOmelette(); order.Add(g); CustomizeGardenOrcOmelette custom = new CustomizeGardenOrcOmelette(g, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddSmokehouseSkeleton(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new SmokehouseSkeleton(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { SmokehouseSkeleton s = new SmokehouseSkeleton(); order.Add(s); CustomizeSmokehouseSkeleton custom = new CustomizeSmokehouseSkeleton(s, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddAretinoAppleJuice(object sender, RoutedEventArgs e) { if (IsCombo) { c.Drink = new AretinoAppleJuice(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { AretinoAppleJuice a = new AretinoAppleJuice(); order.Add(a); CustomizeAretinoAppleJuice custom = new CustomizeAretinoAppleJuice(a, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddDragonbornFries(object sender, RoutedEventArgs e) { if (IsCombo) { c.Side = new DragonbornWaffleFries(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { DragonbornWaffleFries d = new DragonbornWaffleFries(); order.Add(d); CustomizeDragonbornWaffleFries custom = new CustomizeDragonbornWaffleFries(d, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddSailorSoda(object sender, RoutedEventArgs e) { if (IsCombo) { c.Drink = new SailorSoda(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { SailorSoda s = new SailorSoda(); order.Add(s); CustomizeSailorSoda custom = new CustomizeSailorSoda(s, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddCandlehearthCoffee(object sender, RoutedEventArgs e) { if (IsCombo) { c.Drink = new CandlehearthCoffee(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { CandlehearthCoffee c = new CandlehearthCoffee(); order.Add(c); CustomizeCandlehearthCoffee custom = new CustomizeCandlehearthCoffee(c, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddWarriorWater(object sender, RoutedEventArgs e) { if (IsCombo) { c.Drink = new WarriorWater(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { WarriorWater w = new WarriorWater(); order.Add(w); CustomizeWarriorWater custom = new CustomizeWarriorWater(w, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddMadOtarGrits(object sender, RoutedEventArgs e) { if (IsCombo) { c.Side = new MadOtarGrits(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { MadOtarGrits m = new MadOtarGrits(); order.Add(m); CustomizeMadOtarGrits custom = new CustomizeMadOtarGrits(m, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddFriedMiraak(object sender, RoutedEventArgs e) { if (IsCombo) { c.Side = new FriedMiraak(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { FriedMiraak f = new FriedMiraak(); order.Add(f); CustomizeFriedMiraak custom = new CustomizeFriedMiraak(f, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddVokunSalad(object sender, RoutedEventArgs e) { if (IsCombo) { c.Side = new VokunSalad(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { VokunSalad v = new VokunSalad(); order.Add(v); CustomizeVokunSalad custom = new CustomizeVokunSalad(v, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddDoubleDraugr(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new DoubleDraugr(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (DataContext is Order order) { DoubleDraugr d = new DoubleDraugr(); order.Add(d); CustomizeDoubleDraugr custom = new CustomizeDoubleDraugr(d, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddMarkarthMilk(object sender, RoutedEventArgs e) { if (IsCombo) { c.Drink = new MarkarthMilk(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { MarkarthMilk m = new MarkarthMilk(); order.Add(m); CustomizeMarkarthMilk custom = new CustomizeMarkarthMilk(m, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
void AddThalmorTriple(object sender, RoutedEventArgs e) { if (IsCombo) { c.Entree = new ThalmorTriple(); CustomizeComboMeal custom = new CustomizeComboMeal(c); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } if (DataContext is Order order) { ThalmorTriple t = new ThalmorTriple(); order.Add(t); CustomizeThalmorTriple custom = new CustomizeThalmorTriple(t, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } }
/// <summary> /// Event for when the user wants to customize an item that is already in their order /// </summary> /// <param name="sender"></param> /// <param name="e"></param> public void OnCustomizeClick(object sender, RoutedEventArgs e) { var item = orderList.SelectedItem; if (item is ComboMeal combo) { CustomizeComboMeal custom = new CustomizeComboMeal(combo); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (item is Drink drink) { if (drink is AretinoAppleJuice a) { CustomizeAretinoAppleJuice custom = new CustomizeAretinoAppleJuice(a, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (drink is MarkarthMilk m) { CustomizeMarkarthMilk custom = new CustomizeMarkarthMilk(m, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (drink is CandlehearthCoffee c) { CustomizeCandlehearthCoffee custom = new CustomizeCandlehearthCoffee(c, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (drink is SailorSoda s) { CustomizeSailorSoda custom = new CustomizeSailorSoda(s, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (drink is WarriorWater w) { CustomizeWarriorWater custom = new CustomizeWarriorWater(w, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } } else if (item is Entree entree) { if (entree is BriarheartBurger b) { CustomizeBriarheartBurger custom = new CustomizeBriarheartBurger(b, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is DoubleDraugr d) { CustomizeDoubleDraugr custom = new CustomizeDoubleDraugr(d, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is ThalmorTriple t) { CustomizeThalmorTriple custom = new CustomizeThalmorTriple(t, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is GardenOrcOmelette g) { CustomizeGardenOrcOmelette custom = new CustomizeGardenOrcOmelette(g, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is ThugsTBone tb) { CustomizeThugsTBone custom = new CustomizeThugsTBone(tb, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is SmokehouseSkeleton s) { CustomizeSmokehouseSkeleton custom = new CustomizeSmokehouseSkeleton(s, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (entree is PhillyPoacher p) { CustomizePhillyPoacher custom = new CustomizePhillyPoacher(p, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } } else if (item is Side side) { if (side is DragonbornWaffleFries d) { CustomizeDragonbornWaffleFries custom = new CustomizeDragonbornWaffleFries(d, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (side is FriedMiraak f) { CustomizeFriedMiraak custom = new CustomizeFriedMiraak(f, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (side is MadOtarGrits m) { CustomizeMadOtarGrits custom = new CustomizeMadOtarGrits(m, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } else if (side is VokunSalad v) { CustomizeVokunSalad custom = new CustomizeVokunSalad(v, false); OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); orderComponent.Swap(custom); } } }