Esempio n. 1
0
        public void SetupOptionsMenu(Menu menu, MenuObject sourceItem, OrderTableView destinationOrderTable)
        {
            item            = sourceItem;
            orderTable      = destinationOrderTable;
            this.menuObject = sourceItem;
            this.menu       = menu;

            this.NewOptionsMenu();
        }
Esempio n. 2
0
        public OrderItemCell(OrderItem orderItem, OrderTableView otable)
        {
            InitializeComponent();

            this.otable             = otable;
            this.orderItem          = orderItem;
            this.imageView.Source   = new BitmapImage(new Uri(this.orderItem.menuItem.imageName, UriKind.Relative));
            this.titleLabel.Content = this.orderItem.menuItem.name;


            this.update();
        }
Esempio n. 3
0
        public MenuObject(String name, String description, decimal price, MenuObject.Type type, String imageName, string[,,] itemOptions, Menu menu, OrderTableView orderTableView)
        {
            InitializeComponent();

            this.name = name;
            //this.description = description;
            this.description    = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse interdum lacus libero, sed varius lorem varius id. Sed quis mi orci. Proin ultricies ligula ipsum. In congue mollis elit, non ornare nisl iaculis ut.";
            this.price          = price;
            this.priceAsString  = "$" + price.ToString("0.00");
            this.type           = type;
            this.imageName      = imageName;
            this.menu           = menu;
            this.orderTableView = orderTableView;

            try
            {
                for (int i = 0; i < 5; i++)
                {
                    for (int j = 0; j < 6; j++)
                    {
                        if (!(String.IsNullOrEmpty(itemOptions[i, j, 0])) && !(String.IsNullOrEmpty(itemOptions[i, j, 0])))
                        {
                            //System.Diagnostics.Debug.WriteLine("name = " + itemOptions[i, j, 0] + " price = " + itemOptions[i, j, 1]);
                            options[i, j, 0] = itemOptions[i, j, 0];
                            options[i, j, 1] = itemOptions[i, j, 1];
                        }
                    }
                }
            }
            catch (Exception e)
            {
                System.Diagnostics.Debug.WriteLine(e);
            }


            optionsMenu = new OptionsMenu();
            optionsMenu.SetupOptionsMenu(this.menu, this, this.orderTableView);

            orderOptions.Children.Add(optionsMenu);
        }