Esempio n. 1
0
        void BakeShop()
        {
            // ¿ªµêÇ°×¼±¸
            Barbucuer bakeBoy                 = new Barbucuer();
            Command   bakeMuttonCommand1      = new BakeMuttonCommand(bakeBoy);
            Command   bakeMuttonCommand2      = new BakeMuttonCommand(bakeBoy);
            Command   bakeChickenWingCommand1 = new BakeChickenCommand(bakeBoy);

            Waiter waiterGirl = new Waiter();

            waiterGirl.SetOrder(bakeMuttonCommand1);
            waiterGirl.SetOrder(bakeMuttonCommand2);
            waiterGirl.SetOrder(bakeChickenWingCommand1);

            waiterGirl.Notify();
        }
Esempio n. 2
0
 public BakeChickenCommand(Barbucuer receiver) : base(receiver)
 {
 }
Esempio n. 3
0
 public BakeMuttonCommand(Barbucuer receiver) : base(receiver)
 {
 }
Esempio n. 4
0
 public Command(Barbucuer receiver)
 {
     m_Receiver = receiver;
 }