示例#1
0
 public void WatchMovie()
 {
     dimmer.Dim(5);
     dvdPlayer.On();
     dvdPlayer.Insert(dvd);
     dvdPlayer.Play();
 }
示例#2
0
 public void WatchMovie(string movie)
 {
     Console.WriteLine("Get ready to watch movie");
     _popcornPopper.On();
     _popcornPopper.Pop();
     _theaterLights.Dim();
     _screen.Down();
     _projector.On();
     _projector.WideScreenMode();
     _amplifier.On();
     _amplifier.SetDvd();
     _amplifier.SetSurroundSound();
     _amplifier.SetVolume(10);
     _dvdPlayer.On();
     _dvdPlayer.Play(movie);
 }
示例#3
0
 public void WatchMovie(string movie)
 {
     Console.WriteLine("Get ready to watch a movie...");
     _popper.On();
     _popper.Pop();
     _lights.Dim(10);
     _screen.Down();
     _projector.On();
     _projector.WideScreenMode();
     _amplifier.On();
     _amplifier.SetDvd(_dvd);
     _amplifier.SetSurroundSound();
     _amplifier.SetVolume(5);
     _dvd.On();
     _dvd.Play(movie);
 }
示例#4
0
        static void Main(string[] args)
        {
            // Initialize components
            var popper    = new PopcornPopper();
            var lights    = new TheaterLights();
            var screen    = new Screen();
            var projector = new Projector();
            var amp       = new Amplifier();
            var dvd       = new DvdPlayer();

            // Watch "Raiders of the Lost Ark"
            var movieTitle = "Raiders of the Lost Ark";

            Console.WriteLine($"Get ready to watch a movie...");
            popper.On();
            lights.Dim(10);
            screen.Down();
            projector.On();
            projector.WideScreenMode();
            amp.On();
            amp.setDvd(dvd);
            amp.SetSurroundSound();
            amp.SetVolume(5);
            dvd.On();
            dvd.Play(movieTitle);

            // End Movie
            Console.WriteLine("Shutting movie theater down");
            popper.Off();
            lights.On();
            screen.Up();
            projector.Off();
            amp.Off();
            dvd.Stop();
            dvd.Eject();
            dvd.Off();
        }