public void WatchMovie(string movie) { _lights.SetBrightness(20); _dvdPlayer.Play(movie); _musicPlayer.TurnOn(); _projector.RollDown(); }
public void WatchMovie(string movieName) { popcornPopper.On(); popcornPopper.Pop(); screen.Down(); projector.On(); projector.WideScreenMode(); dvdPlayer.On(); dvdPlayer.Play(movieName); Console.WriteLine(); }
static void Main(string[] args) { Console.WriteLine("Media Player Interface Demo"); DVDPlayer mediaPlayer1 = new DVDPlayer(); Console.WriteLine($"{mediaPlayer1.DeviceName}"); mediaPlayer1.DeviceName = "DVD Player"; Console.WriteLine($"{mediaPlayer1.DeviceName}"); string input; Console.WriteLine(">.Press Play\nP.Press Pause\nF.Press FFwd\nR.Press Rewind\nS.Press Stop\n0.To Exit"); while (true) { input = Console.ReadLine(); switch (input) { case ">": mediaPlayer1.Play(); break; case "P": mediaPlayer1.Pause(); break; case "F": mediaPlayer1.Ffwd(); break; case "R": mediaPlayer1.Rewind(); break; case "S": mediaPlayer1.Stop(); break; case "0": return; default: Console.WriteLine("Incorrect Input, try again..."); break; } } }
static void Main() { Console.WriteLine("\n\tMedia Player Interface Demo!"); var mediaPlayer = new DVDPlayer(); //mediaPlayer.DeviceName = "My DVD Player"; Console.WriteLine($"\tstreaming from: {mediaPlayer.DeviceName}"); while (true) { Console.WriteLine("\n\tPush 'Up Arrow' to Play"); Console.WriteLine("\tPush '[Space Bar]' to Pause"); Console.WriteLine("\tPush 'F' to Ffwd"); Console.WriteLine("\tPush 'R' to Rewind"); Console.WriteLine("\tPush 'S' to Stop"); switch (Console.ReadKey().Key) { case ConsoleKey.UpArrow: mediaPlayer.Play(); break; case ConsoleKey.Spacebar: mediaPlayer.Pause(); break; case ConsoleKey.F: mediaPlayer.Ffwd(); break; case ConsoleKey.R: mediaPlayer.Rewind(); break; case ConsoleKey.S: mediaPlayer.Stop(); break; } } }
static void Main(string[] args) { Console.WriteLine("Media Player Demo!"); var mediaPlayer = new DVDPlayer(); Console.WriteLine($"\tStreaming from: {mediaPlayer.DeviceName}."); while (true) { Console.WriteLine("\tPush Up-Arrow to Play"); Console.WriteLine("\tPush [Spacebar] to Stop"); Console.WriteLine("\tPush F to Ffwd"); Console.WriteLine("\tPush R to Rewind"); Console.WriteLine("\tPush P to Pause"); switch (Console.ReadKey().Key) { case ConsoleKey.RightArrow: mediaPlayer.Ffwd(); break; case ConsoleKey.LeftArrow: mediaPlayer.Rewind(); break; case ConsoleKey.Spacebar: mediaPlayer.Stop(); break; case ConsoleKey.DownArrow: mediaPlayer.Pause(); break; case ConsoleKey.UpArrow: mediaPlayer.Play(); break; } } }