Esempio n. 1
0
 public void SetOrder(CommandDemo command)
 {
     if (command.ToString() == "Demo.BakeChickenCommand")
     {
         Console.WriteLine("服务员:没有鸡翅!");
     }
     else
     {
         orders.Add(command);
         Console.WriteLine("增加订单:" + command.ToString() + " 时间:" + DateTime.Now.ToString());
     }
 }
Esempio n. 2
0
 public void CancelOrder(CommandDemo command)
 {
     orders.Remove(command);
     Console.WriteLine("取消订单:" + command.ToString() + " 时间:" + DateTime.Now.ToString());
 }