static void Main() { ConnectionObject.InitConnection(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new KitchenWindow()); }
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); }
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); }
public KitchenWindow() { InitializeComponent(); ConnectionObject.ReceiveNewOrder(ReceiveOrderFunc); }
private void Form1_Load(object sender, EventArgs e) { int intTemp = Convert.ToInt32(Console.ReadLine()); ConnectionObject.UpdateOrderState(4, 2, Order.ORDER_STATE.IN_PREPARATION); }
public Form1() { ConnectionObject.InitConnection(); InitializeComponent(); ConnectionObject.ReceiveNewOrder(receiveOrderFunc); }