Пример #1
0
 public HomeTheatreSystemFacade()
 {
     tv        = new TVScreen();
     speakers  = new Speakers();
     dvd       = new DVDPlayer();
     projector = new Projector();
 }
Пример #2
0
 public void ProjectToHomeThareScreen(TVScreen tv, Speakers speaker, DVDPlayer dvd)
 {
     if (tv.IsOn && speaker.IsOn && dvd.ReadingDvd)
     {
         Console.WriteLine("Started Projecting to Screen");
     }
     else
     {
         Console.WriteLine("Cannot project to screen - Maybe TV, speaker or Dvd player not functioning");
     }
 }
Пример #3
0
 public void ReadDvd(TVScreen tv, Speakers speaker)
 {
     if (tv.IsOn && speaker.IsOn)
     {
         ReadingDvd = true;
         Console.Write("DVD reading");
     }
     else
     {
         ReadingDvd = false;
         Console.Write("DVD Player Off");
     }
 }