Beispiel #1
0
        static void Main(string[] args)
        {
            RemoteControl rc = new ConcreteRemoteControl
            {
                Implementor = new TCL()
            };

            rc.On();
            rc.SetChannel();
            rc.Off();
            Console.WriteLine("------------------------");

            rc.Implementor = new Samsung();
            rc.On();
            rc.SetChannel();
            rc.Off();
            Console.Read();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            RemoteControl remoteControl = new ConcreteRemoteControl();

            //remoteControl.TV = new SanXinTV();
            remoteControl.TV = new ChangHongTV();
            remoteControl.On();
            remoteControl.Off();
            remoteControl.SwitchChannel();
            Console.ReadKey();
        }