Exemplo n.º 1
0
 static void Main()
 {
     ConnectionObject.InitConnection();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     Application.Run(new KitchenWindow());
 }
Exemplo 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);
        }
Exemplo 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);
        }
Exemplo n.º 4
0
 public KitchenWindow()
 {
     InitializeComponent();
     ConnectionObject.ReceiveNewOrder(ReceiveOrderFunc);
 }
Exemplo n.º 5
0
        private void Form1_Load(object sender, EventArgs e)
        {
            int intTemp = Convert.ToInt32(Console.ReadLine());

            ConnectionObject.UpdateOrderState(4, 2, Order.ORDER_STATE.IN_PREPARATION);
        }
Exemplo n.º 6
0
 public Form1()
 {
     ConnectionObject.InitConnection();
     InitializeComponent();
     ConnectionObject.ReceiveNewOrder(receiveOrderFunc);
 }