public HomeTheaterFacade(Amplifier amp,
                          Tuner tuner,
                          DvdPlayer dvd,
                          CdPlayer cd,
                          Projector projector,
                          Screen screen,
                          TheaterLights lights,
                          PopcornPopper popper)
 {
     this._amp       = amp;
     this._tuner     = tuner;
     this._dvd       = dvd;
     this._cd        = cd;
     this._projector = projector;
     this._screen    = screen;
     this._lights    = lights;
     this._popper    = popper;
 }
        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();

            // Wait for user
            Console.ReadKey();
        }
 public CdPlayer(string description, Amplifier amplifier)
 {
     this._description = description;
     this._amplifier   = amplifier;
 }
示例#4
0
 public DvdPlayer(string description, Amplifier amplifier)
 {
     _description = description;
     _amplifier   = amplifier;
 }
示例#5
0
 public CdPlayer(string description, Amplifier amplifier)
 {
     this._description = description;
     this._amplifier = amplifier;
 }
示例#6
0
        static void Main(string[] args)
        {
            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, screen, lights, popper);

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

            // Wait for user
            Console.ReadKey();
        }
示例#7
0
 public HomeTheaterFacade(Amplifier amp,
     Tuner tuner,
     DvdPlayer dvd,
     CdPlayer cd,
     Projector projector,
     Screen screen,
     TheaterLights lights,
     PopcornPopper popper)
 {
     this._amp = amp;
     this._tuner = tuner;
     this._dvd = dvd;
     this._cd = cd;
     this._projector = projector;
     this._screen = screen;
     this._lights = lights;
     this._popper = popper;
 }
示例#8
0
 public Tuner(string description, Amplifier amplifier)
 {
     _description = description;
     _amplifier   = amplifier;
 }