コード例 #1
0
 public TablesDisplayControl()
 {
     InitializeComponent();
     activeTables = new List <int>();
     ConnectionObject.UpdateActiveTables(updateTablesFunc);
     updateTablesFunc(ConnectionObject.GetActiveTables());
 }
コード例 #2
0
 private void OrderDrinkBtn_Click(object sender, EventArgs e)
 {
     if (listBox2.SelectedIndex == -1)
     {
         //No order was selected
     }
     else
     {
         Order newOrder = new Order(listBox1.GetItemText(listBox2.SelectedItem), tableID, 16.99, Order.ORDER_TYPE.BAR);
         ConnectionObject.SendOrder(tableID, newOrder);
     }
 }
コード例 #3
0
        private void showOpenTablePopup(int tableID)
        {
            if (activeTables.Any(x => x == tableID))
            {
                mainForm.ShowNewOrderMenu(tableID);
            }
            else
            {
                OpenTablePopupForm popup        = new OpenTablePopupForm();
                DialogResult       dialogresult = popup.ShowDialog();

                if (dialogresult == DialogResult.OK)
                {
                    ConnectionObject.OpenTable(tableID);
                    mainForm.ShowNewOrderMenu(tableID);
                }

                popup.Dispose();
            }
        }
コード例 #4
0
 public OrdersReadyControl()
 {
     InitializeComponent();
     ordersReady = new List <Order>();
     ConnectionObject.GetOrderReady(updateOrders);
 }