Example #1
0
        static void Main(string[] args)
        {
            ITV     tv  = new TV();
            IRemote rem = new Remote();

            rem.TurnOnTV(tv);
            rem.TurnOffTV(tv);

            ISmartTV stv = new SmartTV();

            rem.TurnOnTV(stv);
            rem.TurnOffTV(stv);
            rem.TurnOnTV(stv);

            ISmartRemote srem = new SmartRemote();

            srem.StartNetflix(stv);
            srem.StartYouTube(stv);

            GermanTV      gtv      = new GermanTV();
            GermanAdapter geradapt = new GermanAdapter(gtv);

            rem.TurnOnTV(geradapt);
            rem.TurnOffTV(geradapt);
        }
        static void Main(string[] args)
        {
            TV          tele               = new TV();
            SmartTV     smartele           = new SmartTV();
            SmartRemote controlinteligente = new SmartRemote();
            Remote      control            = new Remote();

            control.TurnOnTV(tele);
            controlinteligente.TurnOnTV(smartele);
            controlinteligente.StartNetflix(smartele);
            control.TurnOffTV(smartele);
            control.TurnOffTV(tele);
            GermanAdapter teleloca = new GermanAdapter(new GermanTV());

            control.TurnOffTV(teleloca);
            control.TurnOnTV(teleloca);
        }
Example #3
0
        static void Main(string[] args)
        {
            ITV     sony    = new TV();
            IRemote control = new Remote();

            control.TurnOnTV(sony);

            SmartTV      samsung    = new SmartTV();
            ISmartRemote controller = new SmartRemote();

            samsung.TurnOn();
            samsung.PlayNetflix();
            samsung.PlayYoutube();

            if (samsung.Status == true & samsung.netflix == true)
            {
                Console.WriteLine("Se está reproduciendo Netflix.");
            }
            else
            {
                samsung.TurnOff();
                if (samsung.Status == false)
                {
                    Console.WriteLine("La televisión está apagada.");
                }
            }

            GermanTV german = new GermanTV();

            german.Ausschalten();  //Apagado
            if (german.Status == "eingeschaltet")
            {
                Console.WriteLine("The GermanTV is on.");
            }
            else
            {
                Console.WriteLine("The GermanTV is off.");
            }
        }