コード例 #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
ファイル: WaiterMediator.cs プロジェクト: ZPQ4539/ZPQDemo
 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");     //付完款之和将服务员状态变更
     };
 }