Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Pult pult = new Pult();
            TV   tv   = new TV();

            pult.SetCommand(new TVOnCommand(tv));
            pult.PressButton();
            pult.PressUndo();

            Console.Read();
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            Pult pult = new Pult();
            TV   tv   = new TV();

            pult.SetCommand(new TVOnCommand(tv));
            pult.PressButton();
            pult.PressUndo();

            Microwave microwave = new Microwave();

            pult.SetCommand(new MicrowaveCommand(microwave, 1500));
            pult.PressButton();

            Console.ReadLine();
        }