Ejemplo n.º 1
0
 public void HandleOrderReadyNotificationHandled(OrderReadyNotification orderReadyNotification)
 {
     if (OrderReadyNotificationHandled != null)
     {
         OrderReadyNotificationHandled(this, orderReadyNotification);
     }
 }
Ejemplo n.º 2
0
    public void DeclareOrderAsDone(int orderId)
    {
        SetOrderStateAsDone(orderId);
        OrderReadyNotification orderReadyNotification = new OrderReadyNotification(Orders[orderId]);

        if (OrderReady != null)
        {
            OrderReady(this, orderReadyNotification);
        }
    }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public void NotificationHandled(OrderReadyNotification orderReadyNotification)
 {
     iCentralNode.HandleOrderReadyNotificationHandled(orderReadyNotification);
 }
Ejemplo n.º 6
0
 public void HandleOrderReadyNotification(object sender, OrderReadyNotification orderReadyNotification)
 {
     GUI.OnOrderReadyUpdate(orderReadyNotification);
 }