//Tuner tuner;
        //CdPlayer cd;
        //PopcornPopper popper;


        //Facade will be passed  a reference to each component in the subsystem on it's construction
        //then, they will be assinged to the fields above
        public HomeTheaterFacade(Amplifier _amp,
                                 DvdPlayer _dvd,
                                 TheaterLights _lights,
                                 Screen _screen)
        {
            amp    = _amp;
            dvd    = _dvd;
            lights = _lights;
            screen = _screen;
        }
 public HomeTheaterFacade()
 {
     amplifier = new Amplifier("Top-O-Line Amplifier");
     tuner     = new Tuner("Top-O-Line AM/FM Tuner", amplifier);
     dvd       = new DvdPlayer("Top-O-Line DVD Player", amplifier);
     cd        = new CdPlayer("Top-O-Line CD Player", amplifier);
     projector = new Projector("Top-O-Line Projector", dvd);
     lights    = new TheaterLights("Theater Ceiling Lights");
     screen    = new Screen("Theater Screen");
     popper    = new PopcornPopper("Popcorn Popper");
 }
 public HomeTheaterFacade(Amplifier amp, Tuner tuner, DvdPlayer dvd, CdPlayer cd, Projector projector,
                          TheaterLights lights, Screen screen, PopcornPopper popper)
 {
     _amp       = amp;
     _tuner     = tuner;
     _dvd       = dvd;
     _cd        = cd;
     _projector = projector;
     _lights    = lights;
     _screen    = screen;
     _popper    = popper;
 }
Esempio n. 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 HomeTheaterFacade(Amplifier amplifier,
                          Tuner tuner,
                          DvdPlayer dvd,
                          CdPlayer cd,
                          Projector projector,
                          Screen screen,
                          TheaterLights lights,
                          PopcornPopper popper)
 {
     this.amplifier = amplifier;
     this.tuner     = tuner;
     this.dvd       = dvd;
     this.cd        = cd;
     this.screen    = screen;
     this.lights    = lights;
     this.popper    = popper;
 }
 public HomeTheaterFacade(Amplifier amplifier,
                          Tuner tuner,
                          DvdPlayer dvdPlayer,
                          CdPlayer cdPlayer,
                          Projector projector,
                          Screen screen,
                          TheaterLights theaterLights,
                          PopcornPopper popcornPopper)
 {
     _amplifier     = amplifier;
     _tuner         = tuner;
     _dvdPlayer     = dvdPlayer;
     _cdPlayer      = cdPlayer;
     _projector     = projector;
     _screen        = screen;
     _theaterLights = theaterLights;
     _popcornPopper = popcornPopper;
 }
Esempio n. 7
0
        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();
        }
Esempio n. 8
0
        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();
        }
Esempio n. 9
0
 internal void SetDvd(DvdPlayer dvd) => Console.WriteLine($"Amplifier set to DVD");
Esempio n. 10
0
 public HomeTheaterFacade(Projector projector, DvdPlayer dvdplayer, CdPlayer cdplayer)
 {
     this.projector = projector;
     this.dvdplayer = dvdplayer;
     this.cdplayer  = cdplayer;
 }
Esempio n. 11
0
 public void SetDVD(DvdPlayer _dvd)
 {
     myDvd = _dvd;
     Console.WriteLine("The amplifier is now connected to a DVD Player");
 }
Esempio n. 12
0
 public Projector(string description, DvdPlayer dvdPlayer)
 {
     this.description = description;
     this.dvdPlayer   = dvdPlayer;
 }
Esempio n. 13
0
 public Projector(string description, DvdPlayer dvdPlayer)
 {
     _description = description;
     _dvdPlayer   = dvdPlayer;
 }
 public void SetDvd(DvdPlayer dvd)
 {
     Console.WriteLine($"{description} setting DVD player to {dvd}");
     this.dvd = dvd;
 }
Esempio n. 15
0
 public void SetDvd(DvdPlayer dvdPlayer)
 {
     Console.WriteLine($"[{_description}] setting DVD player to {dvdPlayer}");
 }
 public void SetDvd(DvdPlayer dvd)
 {
     Console.WriteLine("{0} setting DVD player to {1}", name, dvd);
     Dvd = dvd;
 }
Esempio n. 17
0
 public Projector(string name, DvdPlayer dvdPlayer)
 {
     this.name      = name;
     this.dvdPlayer = dvdPlayer;
 }