Esempio n. 1
0
        //------------------------------------------------------------------------
        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!");
        }
Esempio n. 2
0
        //------------------------------------------------------------------------
        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!");
            }
        }