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; }
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); }
public ClimatControlControl(DataForControl data) { _data = data; _device = new DeviceControl(_data); }
public DeviceControl(DataForControl data) { _data = data; }