Beispiel #1
0
        /// <summary>
        /// Event handler for if the user finishes their order
        /// Should clear order summary and order number should increment
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void OnFinishClick(object sender, RoutedEventArgs e)
        {
            PaymentOptions pay            = new PaymentOptions();
            OrderComponent orderComponent = this.FindAncestor <OrderComponent>(); // Find the Order Component that is a parent of the current order summary

            orderComponent.Swap(pay);
        }
        /// <summary>
        /// click event that switches to the payment options screen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Complete_Click(object sender, RoutedEventArgs e)
        {
            var payment       = this.FindAncestor <MainWindow>();
            var paymentScreen = new PaymentOptions();

            payment.SwapScreen(paymentScreen);
        }
 //Click handle for the Complete Order Button.
 private void CompleteOrderClickHandle(object sender, RoutedEventArgs e)
 {
     mainWindow.SwitchScreen("paymentOptions");
     if (mainWindow.DataContext is Order order)
     {
         PaymentOptions payment = new PaymentOptions(mainWindow);
     }
 }
        /// <summary>
        /// This button will take the order to the payment screen
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public void CompleteOrderButtonSelection(object sender, RoutedEventArgs e)
        {
            PaymentOptions paymentScreen = new PaymentOptions();

            switchBorder.Child = paymentScreen; //switch to payment screen
            //not sure if data context will be needed?
            paymentScreen.GetOrderObject();     //makes sure I get the ancestor 'order' in Payment Screen
            DisplayCurrentOrder();              //just in case changes were made before confirming a order
        }
Beispiel #5
0
        /// <summary>
        /// Main Window application
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            o             = new OrderTicket();
            order.Child   = o;
            o.DataContext = new Order();
            DisplayControler d = new DisplayControler(o);

            containerBorder.Child = d;
            p = new PaymentOptions(this, d, o);
        }
Beispiel #6
0
        /// <summary>
        /// Initalizes MainWindow an decalres variables for each
        /// of the screens.
        /// </summary>
        public MainWindow()
        {
            InitializeComponent();
            this.DataContext = new Order();

            menuSelect     = new MenuSelect(this);
            orderSummary   = new OrderSummary(this);
            paymentOptions = new PaymentOptions(this);
            cashRegister   = new CashRegister(this);

            comboCustom = new ComboCustomization(this);

            //Entrees
            bbCustom  = new BBurgerCustomization(this);
            ddCustom  = new DDraugrCustomization(this);
            ttCustom  = new TTripleCustomization(this);
            gooCustom = new GOOmeletteCustomization(this);
            ppCustom  = new PPoacherCustomization(this);
            ssCustom  = new SSkeletonCustomization(this);

            //Sides
            dbwfCustom = new DBWFriesCustomization(this);
            fmCustom   = new FMiraakCustomization(this);
            mogCustom  = new MOGritsCustomization(this);
            vsCustom   = new VSaladCustomization(this);

            //Drinks
            aajCustom   = new AAJuiceCustomization(this);
            ccCustom    = new CCoffeeCustomization(this);
            mmCustom    = new MMilkCustomization(this);
            ssodaCustom = new SSodaCustomization(this);
            wwCustom    = new WWaterCustomization(this);

            screen.Child      = menuSelect;
            orderScreen.Child = orderSummary;
        }
        /// <summary>
        /// todo
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void CompleteOrder(object sender, RoutedEventArgs e)
        {
            PaymentOptions po = new PaymentOptions(OrderList);

            containerBorder.Child = po;
        }
 /// <summary>
 /// Displays the payment options
 /// </summary>
 /// <param name="order">The current order</param>
 public void OpenPaymentOptions(Order order)
 {
     paymentOptions        = new PaymentOptions(order, this);
     windowControl.Content = paymentOptions;
 }