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;
        }
示例#2
0
 static void Main(string[] args)
 {
     Amplifier amf = new Amplifier("Amplifier");
     Tuner tun = new Tuner("Tuner",amf);
     DvdPlayer dvd=new DvdPlayer("DVD",amf);
     CdPlayer cd =new CdPlayer("CD",amf);
     Projector projector=new Projector("Projector",dvd);
     TheaterLights lights=new TheaterLights("TheaterLights");
     Screen screen=new Screen("Screen");
     PopcornPopper popper=new PopcornPopper("PopcornPopper");
     HomeTheaterFacade homeTheatre = new HomeTheaterFacade(amf,tun,dvd,cd, projector, screen,lights, popper);
     Console.WriteLine(homeTheatre.ListenToRadio(4.5));
     Console.WriteLine(homeTheatre.ListenToCd("Bony M"));
     Console.WriteLine(homeTheatre.EndRadio());
     Console.WriteLine(homeTheatre.EndCd());
     Console.WriteLine(homeTheatre.WatchMovie("Animate"));
     Console.WriteLine(homeTheatre.EndMovie());
     Console.ReadKey();
 }
示例#3
0
 public string SetDvd(DvdPlayer dvd)
 {
     this.dvd = dvd;
     return description + " setting DVD player to " + dvd.Description + "\n";
 }
示例#4
0
 public Projector(string description, DvdPlayer dvdPlayer)
 {
     this.description = description;
     this.dvdPlayer = dvdPlayer;
 }