private Control CreateControl(Device device)
        {
            DataForControl data = new DataForControl(_house, _room, device);

            if (device is Lamp)
            {
                return new LampControl(data);
            }
            if (device is ClimatControl)
            {
                return new ClimatControlControl(data);
            }
            if (device is Tv)
            {
                return new TvControl(data);
            }
            return null;
        }
示例#2
0
        private Control CreateControl(Device device)
        {
            DataForControl data = new DataForControl(_house, _room, device);

            if (device is Lamp)
            {
                return(new LampControl(data));
            }
            if (device is ClimatControl)
            {
                return(new ClimatControlControl(data));
            }
            if (device is Tv)
            {
                return(new TvControl(data));
            }
            return(null);
        }
 public VolumeContol(DataForControl data)
 {
     _data = data;
     _device = new DeviceControl(_data);
 }
 public LightContol(DataForControl data)
 {
     _data   = data;
     _device = new DeviceControl(_data);
 }
 public TemperControl(DataForControl data)
 {
     _data   = data;
     _device = new DeviceControl(_data);
 }
示例#6
0
 public VolumeContol(DataForControl data)
 {
     _data   = data;
     _device = new DeviceControl(_data);
 }
 public LightContol(DataForControl data)
 {
     _data = data;
     _device = new DeviceControl(_data);
 }
 public TemperControl(DataForControl data)
 {
     _data = data;
     _device = new DeviceControl(_data);
 }
示例#9
0
 public ClimatControlControl(DataForControl data)
 {
     _data   = data;
     _device = new DeviceControl(_data);
 }
 public DeviceControl(DataForControl data)
 {
     _data = data;
 }
 public DeviceControl(DataForControl data)
 {
     _data = data;
 }