Пример #1
0
        /// <summary>
        /// Handles switching menus based on which click event calls it
        /// </summary>
        /// <param name="name">Name of menu to switch to</param>
        public void SwitchMenu(string name)
        {
            switch (name)
            {
            case "Aretino Apple Juice":
                menuInterface.Child = new AretinoJuiceMenu(this);
                break;

            case "Candlehearth Coffee":
                menuInterface.Child = new CandlehearthMenu(this);
                break;

            case "Markarth Milk":
                menuInterface.Child = new MarkarthMilkMenu(this);
                break;

            case "Sailor Soda":
                menuInterface.Child = new SailorSodaMenu(this);
                break;

            case "Warrior Water":
                menuInterface.Child = new WarriorWaterMenu(this);
                break;

            case "Briarheart Burger":
                menuInterface.Child = new BriarheartMenu(this);
                break;

            case "Double Draugr":
                menuInterface.Child = new DoubleDraugrMenu(this);
                break;

            case "Garden Orc Omelette":
                menuInterface.Child = new GardenOrcMenu(this);
                break;

            case "Philly Poacher":
                menuInterface.Child = new PhillyPoacherMenu(this);
                break;

            case "Smokehouse Skeleton":
                menuInterface.Child = new SmokehouseSkeletonMenu(this);
                break;

            case "Thalmor Triple":
                menuInterface.Child = new ThalmorTripleMenu(this);
                break;

            case "Dragonborn Waffle Fries":
                menuInterface.Child = new DragonbornFriesMenu(this);
                break;

            case "Fried Miraak":
                menuInterface.Child = new FriedMiraakMenu(this);
                break;

            case "Mad Otar Grits":
                menuInterface.Child = new MadOtarGritsMenu(this);
                break;

            case "Vokun Salad":
                menuInterface.Child = new VokunSaladMenu(this);
                break;

            case "ItemMenu":
                if (CurrentCombo == null)
                {
                    var newMenu = new ItemSelectionComponent();
                    newMenu.Ancestor    = this;
                    menuInterface.Child = newMenu;
                }
                else
                {
                    SwitchMenu(CurrentCombo);
                }
                break;
            }
        }
Пример #2
0
 /// <summary>
 /// Handles switching menus for modification of an existing item
 /// </summary>
 /// <param name="name">Name of menu to switch to</param>
 public void SwitchMenu(IOrderItem orderItem)
 {
     if (orderItem is AretinoAppleJuice)
     {
         menuInterface.Child = new AretinoJuiceMenu(this, orderItem);
     }
     else if (orderItem is CandlehearthCoffee coffee)
     {
         menuInterface.Child = new CandlehearthMenu(this, coffee);
     }
     else if (orderItem is MarkarthMilk milk)
     {
         menuInterface.Child = new MarkarthMilkMenu(this, milk);
     }
     else if (orderItem is SailorSoda soda)
     {
         menuInterface.Child = new SailorSodaMenu(this, soda);
     }
     else if (orderItem is WarriorWater water)
     {
         menuInterface.Child = new WarriorWaterMenu(this, water);
     }
     else if (orderItem is BriarheartBurger briar)
     {
         menuInterface.Child = new BriarheartMenu(this, briar);
     }
     else if (orderItem is DoubleDraugr draugr)
     {
         menuInterface.Child = new DoubleDraugrMenu(this, draugr);
     }
     else if (orderItem is GardenOrcOmelette orc)
     {
         menuInterface.Child = new GardenOrcMenu(this, orc);
     }
     else if (orderItem is PhillyPoacher philly)
     {
         menuInterface.Child = new PhillyPoacherMenu(this, philly);
     }
     else if (orderItem is SmokehouseSkeleton smoke)
     {
         menuInterface.Child = new SmokehouseSkeletonMenu(this, smoke);
     }
     else if (orderItem is ThalmorTriple triple)
     {
         menuInterface.Child = new ThalmorTripleMenu(this, triple);
     }
     else if (orderItem is DragonbornWaffleFries dragon)
     {
         menuInterface.Child = new DragonbornFriesMenu(this, dragon);
     }
     else if (orderItem is FriedMiraak fried)
     {
         menuInterface.Child = new FriedMiraakMenu(this, fried);
     }
     else if (orderItem is MadOtarGrits otar)
     {
         menuInterface.Child = new MadOtarGritsMenu(this, otar);
     }
     else if (orderItem is VokunSalad vokun)
     {
         menuInterface.Child = new VokunSaladMenu(this, vokun);
     }
     else if (orderItem is Combo combo)
     {
         CurrentCombo        = combo;
         menuInterface.Child = new ComboMenu(this, combo);
     }
     else if (orderItem is ThugsTBone tbone)
     {
         var newMenu = new ItemSelectionComponent();
         newMenu.Ancestor    = this;
         menuInterface.Child = newMenu;
     }
 }