Example #1
0
        public void Remove()
        {
            // Remove the item from the tables' bill.
            MainWindow.getTableManager().CurrentTable.removeItem(item);

            // Remove this item from the stack panel.
            (this.Parent as StackPanel).Children.Remove(this);

            // Nullify the singleton so that selecting OBC's does not attempt to move invalid item.
            BillItemControl.Selected = null;
        }
Example #2
0
        private void selectBillItem(object sender, System.Windows.RoutedEventArgs e)
        {
            if (OrderBillControl.Selected != null)
                OrderBillControl.Selected.reset();

            // Check if the current button has been pressed.
            if (BillItemControl.Selected == this)
            {
                this.reset();
                BillItemControl.Selected = null;
            }
            else
            {
                if (BillItemControl.Selected != null)
                    BillItemControl.Selected.reset();
                BillItemControl.Selected = this;

                this.bgColor.Fill = new SolidColorBrush(Color.FromRgb(255, 255, 32));
            }
        }