예제 #1
0
 static void Main()
 {
     ConnectionObject.InitConnection();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new BarWindow());
 }
예제 #2
0
        private void PrepBtn_Click(object sender, EventArgs e)
        {
            if (ordersNotHandledBox.SelectedIndex == -1)
            {
                Console.WriteLine("No order was selected");
                return;
            }

            string[] tokens = ordersNotHandledBox.GetItemText(ordersNotHandledBox.SelectedItem).Split(' ');
            ConnectionObject.UpdateOrderState(Convert.ToInt32(tokens[1]), Convert.ToInt32(tokens[0]), Order.ORDER_STATE.IN_PREPARATION);
        }
예제 #3
0
        private void ReadyBtn_Click(object sender, EventArgs e)
        {
            if (ordersInPreparationBox.SelectedIndex == -1)
            {
                Console.WriteLine("No order was selected");
                return;
            }

            string[] tokens = ordersInPreparationBox.GetItemText(ordersInPreparationBox.SelectedItem).Split(' ');

            //REMOVES THE NOW READY ORDER FROM THE TERMINAL'S STORAGE
            RemoveReceivedOrder(Convert.ToInt32(tokens[0]));
            ConnectionObject.UpdateOrderState(Convert.ToInt32(tokens[1]), Convert.ToInt32(tokens[0]), Order.ORDER_STATE.READY);
        }
예제 #4
0
 public BarWindow()
 {
     InitializeComponent();
     ConnectionObject.ReceiveNewOrder(ReceiveOrderFunc);
 }