Esempio n. 1
0
 public void removeOrderItem(OrderMenuItem item)
 {
     _price -= item.menuItem.Price;
     notOrderedList.Remove(item.menuItem);
     NotOrderedYet.Children.Remove(item);
     resizeSides();
 }
Esempio n. 2
0
        private void updateDisplay(bool clear, MenuItem item)
        {
            //clear NotOrderedList only if kitchen button has been pressed
            if (clear == true)
            {
                NotOrderedYet.Children.Clear();

                for (int i = 0; i < alreadyOrderedList.Count; i++)
                {
                    OrderMenuItem ord = new OrderMenuItem();
                    ord.parentList    = this;
                    ord.menuItem      = alreadyOrderedList[i];
                    ord.notOrderedYet = false;
                    AlreadyOrdered.Children.Add(ord);
                }

                alreadyOrderedList.Clear();
                notOrderedList.Clear();
                this.total.Content = "Total: $" + Math.Round(_price, 2).ToString("0.00");
            }

            OrderMenuItem or = new OrderMenuItem();

            or.parentList = this;
            if (item != null)
            {
                or.menuItem      = item;
                or.notOrderedYet = true;
                NotOrderedYet.Children.Add(or);
            }
            //notOrderedList.Clear();
        }
Esempio n. 3
0
 private void resizeOrderlist(object sender, SizeChangedEventArgs e)
 {
     orderListStack.Width = alreadyOrderedLabel.ActualWidth * 1.5;
     for (int i = 0; i < alreadyOrderedList.Count; i++)
     {
         OrderMenuItem or = AlreadyOrdered.Children[i] as OrderMenuItem;
         or.FontSize = this.ActualHeight * 0.03;
     }
     for (int i = 0; i < notOrderedList.Count; i++)
     {
         OrderMenuItem or = NotOrderedYet.Children[i] as OrderMenuItem;
         or.FontSize = this.ActualHeight * 0.03;
     }
 }