Пример #1
0
        /// <summary>
        /// Click event for return to order button. Returns back to the order screen.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Contains the event data.</param>
        public void ReturnToOrder(object sender, RoutedEventArgs e)
        {
            var menu = new MenuSelectionComponent();

            menu.DataContext          = currentOrder;
            fullComponentBorder.Child = menu;
        }
Пример #2
0
 /// <summary>
 /// Thalmor Triple customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public ThalmorTriple(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display = display;
     this.menu    = menu;
     this.order   = order;
 }
Пример #3
0
 /// <summary>
 /// Smokehouse Skeleton customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public SmokehouseSkeleton(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display = display;
     this.menu    = menu;
     this.order   = order;
 }
Пример #4
0
 /// <summary>
 /// Brairheart burger customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public BriarheartBurger(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display = display;
     this.menu    = menu;
     this.order   = order;
 }
Пример #5
0
 /// <summary>
 /// Philly Poacher customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public PhillyPoacher(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display = display;
     this.menu    = menu;
     this.order   = order;
 }
 /// <summary>
 /// Garnden Orc Omlette customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public GardenOrcOmlette(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display = display;
     this.menu    = menu;
     this.order   = order;
 }
Пример #7
0
 public Combo(DisplayControler d, MenuSelectionComponent m, OrderTicket o)
 {
     InitializeComponent();
     comboDeal = new Data.Combo();
     this.d    = d;
     this.m    = m;
     this.o    = o;
 }
 /// <summary>
 /// Markarth Milk customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public MarkarthMilk(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display    = display;
     this.menu       = menu;
     this.order      = order;
     Small.IsChecked = true;
 }
Пример #9
0
 /// <summary>
 /// Dragonborn Waffle Fries customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public DragonbornWaffleFries(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display    = display;
     this.menu       = menu;
     this.order      = order;
     Small.IsChecked = true;
 }
Пример #10
0
        public DisplayControler(OrderTicket order)
        {
            InitializeComponent();
            this.order = order;
            MenuSelectionComponent ms = new MenuSelectionComponent(this, order);

            containerBorder.Child = ms;
        }
        /// <summary>
        /// Click event for nextButton. Closes customization screen and saves relevant information when button is clicked.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Contains the event data.</param>
        void NextItemOrder(object sender, RoutedEventArgs e)
        {
            var menu = new MenuSelectionComponent();

            menu.DataContext = currentOrder;
            fullCustomizationGrid.Children.Clear();
            fullComponentBorder.Child = menu;
        }
 /// <summary>
 /// Arentino Apple Juice customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public ArentinoAppleJuice(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     Small.IsChecked = true;
     this.display    = display;
     this.menu       = menu;
     this.order      = order;
 }
Пример #13
0
 /// <summary>
 /// Sailor Soda customization menu
 /// </summary>
 /// <param name="display">Display controller</param>
 /// <param name="menu">Menu selection</param>
 /// <param name="order">oder ticket</param>
 public SailorSoda(DisplayControler display, MenuSelectionComponent menu, OrderTicket order)
 {
     InitializeComponent();
     this.display         = display;
     this.menu            = menu;
     this.order           = order;
     Small.IsChecked      = true;
     Blackberry.IsChecked = true;
 }
        /// <summary>
        /// Click event for cancelButton. Cancels entire order when button is clicked.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Contains the event data.</param>
        void CancelOrder(object sender, RoutedEventArgs e)
        {
            Order or = new Order();

            DataContext = or;
            MenuSelectionComponent msc = new MenuSelectionComponent();

            mscBorder.Child = msc;
            msc.DataContext = or;
        }
 /// <summary>
 /// Initializes the order component
 /// </summary>
 public OrderComponent()
 {
     InitializeComponent();
     order              = new Order();
     this.DataContext   = order;
     Menu               = new MenuSelectionComponent(this);
     reciept            = new OrderSum(this);
     pageDisplay.Child  = Menu;
     orderSummary.Child = reciept;
 }
 /// <summary>
 /// Handles event for when a new order needs to be created (finishing the old order)
 /// </summary>
 /// <param name="sender">Reference to the object that raised the event.</param>
 /// <param name="e">Contains the event data.</param>
 void NewOrderEvent(object sender, RoutedEventArgs e)
 {
     if (e.Source is PaymentOptionsScreen || e.Source is CashPaymentProcessing)
     {
         Order or = new Order();
         DataContext = or;
         MenuSelectionComponent msc = new MenuSelectionComponent();
         mscBorder.Child = msc;
         msc.DataContext = or;
         e.Handled       = true;
     }
 }
 /// <summary>
 /// Click event for nextButton. Closes customization screen and saves relevant information when button is clicked.
 /// </summary>
 /// <param name="sender">Reference to the object that raised the event.</param>
 /// <param name="e">Contains the event data.</param>
 void NextItemOrder(object sender, RoutedEventArgs e)
 {
     if (!isCombo)
     {
         var menu = new MenuSelectionComponent();
         menu.DataContext = currentOrder;
         fullCustomizationGrid.Children.Clear();
         fullComponentBorder.Child = menu;
     }
     else
     {
         var coCustomization = new ComboCustomization(currentOrder);
         coCustomization.DataContext = currentCombo;
         fullCustomizationGrid.Children.Clear();
         fullComponentBorder.Child = coCustomization;
     }
 }
        /// <summary>
        /// Changes the usercontrol of the main menu contained within the ordercomponent
        /// </summary>
        /// <param name="customizer">a string describing the control to go to</param>
        public void changePrimaryMenu(string customizer)
        {
            switch (customizer)
            {
            case "Create A Combo":
            {
                PrimaryMenuBorder.Child = new ComboSelection();
                ComboSelection c = PrimaryMenuBorder.Child as ComboSelection;
                c.DataContext = new Combo();
                break;
            }

            case "Selection":
            {
                PrimaryMenuBorder.Child = new MenuSelectionComponent();
                MenuSelectionComponent c = PrimaryMenuBorder.Child as MenuSelectionComponent;
                c.DataContext = null;
                break;
            }

            case "Briarheart Burger":
            {
                PrimaryMenuBorder.Child = new BriarheartBurgerCustomizer();
                BriarheartBurgerCustomizer c = PrimaryMenuBorder.Child as BriarheartBurgerCustomizer;
                c.DataContext = new BriarheartBurger();
                break;
            }

            case "Double Draugr":
            {
                PrimaryMenuBorder.Child = new DoubleDraugerCustomizer();
                DoubleDraugerCustomizer c = PrimaryMenuBorder.Child as DoubleDraugerCustomizer;
                c.DataContext = new DoubleDraugr();
                break;
            }

            case "Garden Orc Omelette":
            {
                PrimaryMenuBorder.Child = new GardenOrcOmeletteCustomizer();
                GardenOrcOmeletteCustomizer c = PrimaryMenuBorder.Child as GardenOrcOmeletteCustomizer;
                c.DataContext = new GardenOrcOmelette();
                break;
            }

            case "Philly Poacher":
            {
                PrimaryMenuBorder.Child = new PhillyPoacherCustomizer();
                PhillyPoacherCustomizer c = PrimaryMenuBorder.Child as PhillyPoacherCustomizer;
                c.DataContext = new PhillyPoacher();
                break;
            }

            case "Smokehouse Skeleton":
            {
                PrimaryMenuBorder.Child = new SmokehouseSkeletonCustomizer();
                SmokehouseSkeletonCustomizer c = PrimaryMenuBorder.Child as SmokehouseSkeletonCustomizer;
                c.DataContext = new SmokehouseSkeleton();
                break;
            }

            case "Thalmor Triple":
            {
                PrimaryMenuBorder.Child = new ThalmorTripleCustomizer();
                ThalmorTripleCustomizer c = PrimaryMenuBorder.Child as ThalmorTripleCustomizer;
                c.DataContext = new ThalmorTriple();
                break;
            }

            case "Thugs T-Bone":
            {
                PrimaryMenuBorder.Child = new MenuSelectionComponent();
                MenuSelectionComponent c = PrimaryMenuBorder.Child as MenuSelectionComponent;
                c.DataContext = new ThugsTBone();
                break;
            }

            case "Dragonborn Waffle Fries":
            {
                PrimaryMenuBorder.Child = new SideCustomizer();
                SideCustomizer c = PrimaryMenuBorder.Child as SideCustomizer;
                c.DataContext = new DragonbornWaffleFries();
                break;
            }

            case "Fried Miraak":
            {
                PrimaryMenuBorder.Child = new SideCustomizer();
                SideCustomizer c = PrimaryMenuBorder.Child as SideCustomizer;
                c.DataContext = new FriedMiraak();
                break;
            }

            case "Mad Otar Grits":
            {
                PrimaryMenuBorder.Child = new SideCustomizer();
                SideCustomizer c = PrimaryMenuBorder.Child as SideCustomizer;
                c.DataContext = new MadOtarGrits();
                break;
            }

            case "Vokun Salad":
            {
                PrimaryMenuBorder.Child = new SideCustomizer();
                SideCustomizer c = PrimaryMenuBorder.Child as SideCustomizer;
                c.DataContext = new VokunSalad();
                break;
            }

            case "Aretino Apple Juice":
            {
                PrimaryMenuBorder.Child = new AretinoAppleJuiceCustomizer();
                AretinoAppleJuiceCustomizer c = PrimaryMenuBorder.Child as AretinoAppleJuiceCustomizer;
                c.DataContext = new AretinoAppleJuice();
                break;
            }

            case "Candlehearth Coffee":
            {
                PrimaryMenuBorder.Child = new CandlehearthCoffeeCustomizer();
                CandlehearthCoffeeCustomizer c = PrimaryMenuBorder.Child as CandlehearthCoffeeCustomizer;
                c.DataContext = new CandlehearthCoffee();
                break;
            }

            case "Markarth Milk":
            {
                PrimaryMenuBorder.Child = new MarkarthMilkCustomizer();
                MarkarthMilkCustomizer c = PrimaryMenuBorder.Child as MarkarthMilkCustomizer;
                c.DataContext = new MarkarthMilk();
                break;
            }

            case "Warrior Water":
            {
                PrimaryMenuBorder.Child = new WarriorWaterCustomizer();
                WarriorWaterCustomizer c = PrimaryMenuBorder.Child as WarriorWaterCustomizer;
                c.DataContext = new WarriorWater();
                break;
            }

            case "Sailor Soda":
            {
                PrimaryMenuBorder.Child = new SailorSodaCustomizer();
                SailorSodaCustomizer c = PrimaryMenuBorder.Child as SailorSodaCustomizer;
                c.DataContext = new SailorSoda();
                break;
            }

            case null:
                break;
            }
        }
        /// <summary>
        /// Click event for cancel. Cancels item when button is clicked.
        /// </summary>
        /// <param name="sender">Reference to the object that raised the event.</param>
        /// <param name="e">Contains the event data.</param>
        void CancelItem(object sender, RoutedEventArgs e)
        {
            var        item     = orderList.SelectedItem;
            IOrderItem removeMe = new AretinoAppleJuice();

            if (item is Combo co)
            {
                removeMe = co;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is AretinoAppleJuice aj)
            {
                removeMe = aj;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is CandlehearthCoffee cc)
            {
                removeMe = cc;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is MarkarthMilk mm)
            {
                removeMe = mm;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is SailorSoda ss)
            {
                removeMe = ss;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is WarriorWater ww)
            {
                removeMe = ww;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is BriarheartBurger bb)
            {
                removeMe = bb;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is DoubleDraugr dd)
            {
                removeMe = dd;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is GardenOrcOmelette goo)
            {
                removeMe = goo;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is PhillyPoacher pp)
            {
                removeMe = pp;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is SmokehouseSkeleton sms)
            {
                removeMe = sms;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is ThalmorTriple tt)
            {
                removeMe = tt;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is ThugsTBone ttb)
            {
                removeMe = ttb;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is DragonbornWaffleFries dwf)
            {
                removeMe = dwf;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is FriedMiraak fm)
            {
                removeMe = fm;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is MadOtarGrits mog)
            {
                removeMe = mog;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            else if (item is VokunSalad vs)
            {
                removeMe = vs;
                var menu = new MenuSelectionComponent();
                menu.DataContext       = this.DataContext;
                mscBorder.Child        = menu;
                orderList.SelectedItem = null;
            }
            ((Order)OrderComponent.DataContext).Remove(removeMe);
        }