/// <summary>
 /// Click Event for switching the entree of the combo to Briarheart Burger and switches to its customization screen
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 void BriarheartBurgerClick(object sender, RoutedEventArgs e)
 {
     if (DataContext is Order order)
     {
         BriarheartBurger bb = new BriarheartBurger();
         combo.Entree = bb;
         CustomizeBriarheartBurger temp = new CustomizeBriarheartBurger(menu, bb, order, combo);
         temp.doneButton.IsEnabled   = false;
         temp.cancelButton.IsEnabled = false;
         menu.orderBorder.Child      = temp;
     }
 }
示例#2
0
        /// <summary>
        /// Click event to add a Briarheart Burger to the current order
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void BriarheartBurgerClick(object sender, RoutedEventArgs e)
        {
            BriarheartBurger bb   = new BriarheartBurger();
            Combo            temp = new Combo(null, null, null);

            if (DataContext is Order order)
            {
                order.Add(bb);
                CustomizeBriarheartBurger newScreen = new CustomizeBriarheartBurger(menu, bb, order, temp);
                newScreen.returnToOrderbutton.IsEnabled = false;
                menu.orderBorder.Child = newScreen;
            }
        }
示例#3
0
        /// <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);
                }
            }
        }