//------------------------------------------------------------------------ public void DoorDevice(IDoorDevice sameDevice) { Console.Write("Are you want Open or Close device door? "); Message = (Console.ReadLine()).ToLower(); if (Message.Contains("open")) { sameDevice.OpenClose(true); } else if (Message.Contains("close")) { sameDevice.OpenClose(false); } else Console.WriteLine("Set clear instructions!"); }
//------------------------------------------------------------------------ public void DoorDevice(IDoorDevice sameDevice) { Console.Write("Are you want Open or Close device door? "); Message = (Console.ReadLine()).ToLower(); if (Message.Contains("open")) { sameDevice.OpenClose(true); } else if (Message.Contains("close")) { sameDevice.OpenClose(false); } else { Console.WriteLine("Set clear instructions!"); } }