Ejemplo n.º 1
0
 static void Main()
 {
     ConnectionObject.InitConnection();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new BarWindow());
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
 public BarWindow()
 {
     InitializeComponent();
     ConnectionObject.ReceiveNewOrder(ReceiveOrderFunc);
 }