//------------------------------------------ public void ModeWorkForDevice(IModeOfWork sameDevice) { Console.WriteLine("Set mode of work for device: "); try { sameDevice.ChangeModeWork(Int32.Parse(Console.ReadLine())); } catch (Exception ex) { Console.WriteLine(ex.Message); } }