Beispiel #1
0
        static void ConfigureRemoteControlTV(Invoker_RemoteControl remoteControl, int position)
        {
            Receiver_TV  livingRoomTV   = new Receiver_TV();
            Command_TVOn livingRoomTVOn = new Command_TVOn(livingRoomTV);

            remoteControl.SetOnCommand(livingRoomTVOn, position);

            Command_TVOff livingRoomTVOff = new Command_TVOff(livingRoomTV);

            remoteControl.SetOffCommand(livingRoomTVOff, position);
        }
 public Command_TVOff(Receiver_TV tv)
 {
     this.tv = tv;
 }