示例#1
0
        static void Main(string[] args)
        {
            SmartTv minhaTv = new SmartTv();

            Console.WriteLine("SELECIONE UM CANAL");
            Console.WriteLine("1- Filmes\n2- Documentários\n3- Culunária");

            ConsoleKeyInfo input = Console.ReadKey();

            switch (input.KeyChar)
            {
            case '1':
                minhaTv.canal_atual = new Filme();
                break;

            case '2':
                minhaTv.canal_atual = new Documentario();
                break;

            case '3':
                minhaTv.canal_atual = new Culinaria();
                break;

            default:
                break;
            }

            Console.WriteLine();

            minhaTv.ExibeCanalSintonizado();
            minhaTv.PlayTv();
        }
示例#2
0
        static void Main(string[] args)
        {
            var smarTv = new SmartTv();

            var input = Console.ReadLine();

            switch (input)
            {
            case "filme":
                smarTv.Canal = new Filme();
                break;

            case "culinaria":
                smarTv.Canal = new Culinaria();
                break;

            case "documentario":
                smarTv.Canal = new Documentario();
                break;

            default:
                break;
            }

            smarTv.CanalSintonizado();
            smarTv.PlayTv();
        }
示例#3
0
        static void Main(string[] args)
        {
            SmartTv minhaTv = new SmartTv();

            Console.WriteLine("selecione um canal");
            Console.WriteLine("1 - filmes");
            Console.WriteLine("2 - documentarios");
            Console.WriteLine("3 - culinaria");

            ConsoleKeyInfo impout = Console.ReadKey();

            switch (impout.KeyChar)
            {
            case '1':
                minhaTv.CanalAtual = new Filme();
                break;

            case '2':
                minhaTv.CanalAtual = new Documentario();
                break;

            case '3':
                minhaTv.CanalAtual = new Culinaria();
                break;
            }

            minhaTv.ExibeCanalSintonizado();
            minhaTv.PlayTv();
        }
        static void Main(string[] args)
        {
            SmartTv smart = new SmartTv();

            Console.WriteLine("selecione um canal");
            Console.WriteLine("1 - filmes\n2 - documentarios\n3 - culinaria");

            var input = Console.ReadKey();

            switch (input.KeyChar)
            {
            case '1':
                smart.CanalAtual = new Filme();
                break;

            case '2':
                smart.CanalAtual = new Documentario();
                break;

            case '3':
                smart.CanalAtual = new Culinaria();
                break;
            }

            Console.WriteLine();
            smart.ExibeCanalSintonizado();
            smart.PlayTv();

            Console.ReadKey();
        }
示例#5
0
        static void Main(string[] args)
        {
            SmartTv tv = new SmartTv();

            tv.VideoSource = new IpTvService();

            tv.ShowTvGuide();
            tv.PlayTv();

            tv.VideoSource = new LocalCableTv();
            tv.ShowTvGuide();
            tv.PlayTv();
        }