Beispiel #1
0
        public static void RunTest()
        {
            HomeTheaterFacade homeTheater = new HomeTheaterFacade(new Amplifier(), new DvdPlayer(), new TheaterLights(), new Screen());

            homeTheater.WatchMovie("Star Wars IV");
            homeTheater.EndMovie();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            HomeTheaterFacade homeTheater = new HomeTheaterFacade();

            homeTheater.WatchMovie("Raiders of the Lost Ark");
            homeTheater.EndMovie();
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            HomeTheaterFacade hometheater = new HomeTheaterFacade(new Projector(), new DvdPlayer(), new CdPlayer());

            hometheater.WatchMovie();

            hometheater.EndMovie();

            Console.Read();
        }
Beispiel #4
0
        public static void Main(string[] args)
        {
            var amp       = new Amplifier("Top-O-Line Amplifier");
            var tuner     = new Tuner("Top-O-Line AM/FM Tuner", amp);
            var dvd       = new DvdPlayer("Top-O-Line DVD Player", amp);
            var cd        = new CdPlayer("Top-O-Line CD Player", amp);
            var projector = new Projector("Top-O-Line Projector", dvd);
            var lights    = new TheaterLights("Theater Ceiling Lights");
            var screen    = new Screen("Theater Screen");
            var popper    = new PopcornPopper("Popcorn Popper");

            var homeTheater = new HomeTheaterFacade(amp, tuner, dvd, cd, projector, screen, lights, popper);

            homeTheater.WatchMovie("Raiders of the Lost Ark");
            homeTheater.EndMovie();
        }
        public void Run()
        {
            Amplifier     amp       = new Amplifier("Top-O-Line Amplifier");
            Tuner         tuner     = new Tuner("Top-O-Line AM/FM Tuner", amp);
            DvdPlayer     dvd       = new DvdPlayer("Top-O-Line DVD Player", amp);
            CdPlayer      cd        = new CdPlayer("Top-O-Line CD Player", amp);
            Projector     projector = new Projector("Top-O-Line Projector", dvd);
            TheaterLights lights    = new TheaterLights("Theater Ceiling Lights");
            Screen        screen    = new Screen("Theater Screen");
            PopcornPopper popper    = new PopcornPopper("Popcorn Popper");

            HomeTheaterFacade homeTheater =
                new HomeTheaterFacade(amp, tuner, dvd, cd,
                                      projector, lights, screen, popper);

            homeTheater.WatchMovie("Raiders of the Lost Ark");

            Console.WriteLine();

            homeTheater.EndMovie();
        }
        static void Main(string[] args)
        {
            const string fancyName = "Top-O-Line";

            var popper    = new FancyPopcornPopper();
            var lights    = new FancyThreaterLights(fancyName);
            var screen    = new FancyScreen();
            var projector = new FancyProjector();
            var cd        = new FancyCdPlayer(fancyName);
            var dvd       = new FancyDvdPlayer(fancyName);
            var tuner     = new FancyTuner(fancyName);
            var amp       = new FancyAmplifier(fancyName);

            IHomeTheaterFacade homeTheater = new HomeTheaterFacade(amp, tuner, dvd, cd,
                                                                   projector, lights, screen, popper);

            homeTheater.WatchMovie("Raiders of the Lost Ark");
            homeTheater.EndMovie();

            Console.ReadLine();
        }
        static void Main(string[] args)
        {
            Amplifier     amp       = new Amplifier();
            Tuner         tuner     = new Tuner();
            DvdPlayer     dvdPlayer = new DvdPlayer();
            CdPlayer      cdPlayer  = new CdPlayer();
            Projector     projector = new Projector();
            TheaterLights lights    = new TheaterLights();
            Screen        screen    = new Screen();
            PopcornPopper popper    = new PopcornPopper();


            HomeTheaterFacade homeTheater =
                new HomeTheaterFacade(amp, tuner, dvdPlayer, cdPlayer,
                                      projector, screen, lights, popper);

            homeTheater.WatchMovie("Inception");
            Console.WriteLine();
            homeTheater.EndMovie();
            Console.ReadKey();
        }