Exemplo n.º 1
0
 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;
 }
 public HomeTheaterFacade(Amplifier amplifier, CdPlayer cdPlayer, DvdPlayer dvdPlayer,
                          PopcornPopper popcornPopper, Projector projector, Screen screen,
                          TheaterLights theaterLights, Tuner tuner)
 {
     this.amplifier     = amplifier;
     this.cdPlayer      = cdPlayer;
     this.dvdPlayer     = dvdPlayer;
     this.popcornPopper = popcornPopper;
     this.projector     = projector;
     this.screen        = screen;
     this.theaterLights = theaterLights;
     this.tuner         = tuner;
 }
        static void Main(string[] args)
        {
            var amp       = new Amplifier();
            var tuner     = new Tuner();
            var dvd       = new DvdPlayer();
            var cd        = new CdPlayer();
            var projector = new Projector();
            var screen    = new Screen();
            var lights    = new TheaterLights();
            var popper    = new PopcornPopper();

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

            homeTheater.WatchMovie("Raider of the Lost Ark");
            homeTheater.EndMovie();
        }
        static void Main(string[] args)
        {
            Amplifier     amp       = new Amplifier();
            Tuner         tuner     = new Tuner();
            DvdPlayer     dvd       = new DvdPlayer();
            CdPlayer      cd        = new CdPlayer();
            Projector     projector = new Projector();
            TheaterLights lights    = new TheaterLights();
            Screen        screen    = new Screen();
            PopcornPopper popper    = new PopcornPopper();

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

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();
        }
 public HomeTheaterFacade(Amplifier amp,
                          Tuner tuner,
                          DvdPlayer dvd,
                          CdPlayer cd,
                          Projector projector,
                          TheaterLights lights,
                          Screen screen,
                          PopcornPopper popper)
 {
     this.amp       = amp;
     this.tuner     = tuner;
     this.dvd       = dvd;
     this.cd        = cd;
     this.projector = projector;
     this.lights    = lights;
     this.screen    = screen;
     this.popper    = popper;
 }
Exemplo n.º 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, lights, screen, popper);

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();

            Console.ReadLine();
        }
Exemplo n.º 7
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, lights, screen, popper);

            homeTheater.watchMovie("Raiders of the Lost Ark");
            homeTheater.endMovie();

            Console.ReadLine();
        }
 public HomeTheaterFacade(
     Amplifier amplifier,
     Tuner tuner,
     DvdPlayer dvdPlayer,
     CdPlayer cdPlayer,
     Projector projector,
     TheaterLights theaterLights,
     Screen screen,
     PopcornPopper popcornPopper)
 {
     _amplifier     = amplifier;
     _tuner         = tuner;
     _dvdPlayer     = dvdPlayer;
     _cdPlayer      = cdPlayer;
     _projector     = projector;
     _theaterLights = theaterLights;
     _screen        = screen;
     _popcornPopper = popcornPopper;
 }
Exemplo n.º 9
0
 public void setCd(CdPlayer cd)
 {
     Console.WriteLine(description + " setting CD player to " + cd);
     this.cd = cd;
 }
Exemplo n.º 10
0
 public void setCd(CdPlayer cd)
 {
     Console.WriteLine(description + " setting CD player to " + cd);
     this.cd = cd;
 }