Пример #1
0
 public WaiterMediator(WaiterView view) : base(NAME, view)
 {
     WaiterView.CallWaiter += () => { SendNotification(OrderSystemEvent.CALL_WAITER); };
     WaiterView.Order      += data => { SendNotification(OrderSystemEvent.ORDER, data); };
     WaiterView.Pay        += () => { SendNotification(OrderSystemEvent.PAY); };
     WaiterView.CallCook   += () => { SendNotification(OrderSystemEvent.CALL_COOK); };
     WaiterView.ServerFood += () => { SendNotification(OrderSystemEvent.SERVER_FOOD); };
 }
Пример #2
0
 public WaiterMediator(WaiterView view) : base(NAME, view)
 {
     WaiterView.CallWaiter += () => { SendNotification(OrderSystemEvent.CALL_WAITER); };
     WaiterView.Order      += data => { SendNotification(OrderSystemEvent.ORDER, data); };
     WaiterView.Pay        += () => { SendNotification(OrderSystemEvent.PAY); };
     WaiterView.CallCook   += () => { SendNotification(OrderSystemEvent.CALL_COOK); };
     WaiterView.ServerFood += item => { SendNotification(OrderSystemEvent.selectWaiter, item, "WANSHI");     //付完款之和将服务员状态变更
     };
 }