public void HandleOrderReadyNotificationHandled(OrderReadyNotification orderReadyNotification) { if (OrderReadyNotificationHandled != null) { OrderReadyNotificationHandled(this, orderReadyNotification); } }
public void DeclareOrderAsDone(int orderId) { SetOrderStateAsDone(orderId); OrderReadyNotification orderReadyNotification = new OrderReadyNotification(Orders[orderId]); if (OrderReady != null) { OrderReady(this, orderReadyNotification); } }
public void OnOrderReadyUpdate(OrderReadyNotification orderReadyNotification) { string[] row = { orderReadyNotification.Id.ToString(), orderReadyNotification.Order.Product.Name, orderReadyNotification.Order.Quantity.ToString(), orderReadyNotification.Order.TableNumber.ToString() }; ListViewAddItemDelegate listViewAddItemDelegate = listViewNotifications.Items.Add; ListViewItem newOrderReadyNotificationEntry = new ListViewItem(row); newOrderReadyNotificationEntry.BackColor = Color.DarkRed; BeginInvoke(listViewAddItemDelegate, newOrderReadyNotificationEntry); }
public void OnOrderReadyHandledNotification(OrderReadyNotification orderReadyNotification) { ListViewEditItem listViewEditItem = () => { foreach (ListViewItem listViewItem in listViewNotifications.Items) { if (listViewItem.SubItems[0] != null && listViewItem.SubItems[0].Text == orderReadyNotification.Id.ToString()) { listViewItem.BackColor = Color.DarkSeaGreen; return; } } }; BeginInvoke(listViewEditItem); }
public void NotificationHandled(OrderReadyNotification orderReadyNotification) { iCentralNode.HandleOrderReadyNotificationHandled(orderReadyNotification); }
public void HandleOrderReadyNotification(object sender, OrderReadyNotification orderReadyNotification) { GUI.OnOrderReadyUpdate(orderReadyNotification); }