public void Undo(IDataCommand dataCommand) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.DecrementLight(); } }
public void Execute(IDataCommand dataCommand) { IClimatControl control = dataCommand.GetDevice() as IClimatControl; if (control != null) { control.Auto = !control.Auto; } }
public void Execute(IDataCommand dataCommand) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.IncrementLight(); } }
public void Execute(IDataCommand dataCommand) { ITemperature control = dataCommand.GetDevice() as ITemperature; if (control != null) { control.IncrementTemperature(); } }
public void Undo(IDataCommand dataCommand) { ITemperature control = dataCommand.GetDevice() as ITemperature; if (control != null) { control.DecrementTemperature(); } }
public void Execute(IDataCommand dataCommand) { ClimatControl control = dataCommand.GetDevice() as ClimatControl; if (control != null) { control.OnOffHeat(); } }
public void Execute(IDataCommand dataCommand) { HouseCinema control = dataCommand.GetDevice() as HouseCinema; if (control != null) { control.OnOffDvd(); } }
public void Undo(IDataCommand dataCommand) { IOnOff onOff = dataCommand.GetDevice() as IOnOff; if (onOff != null) { onOff.On(); } }
public void Undo(IDataCommand dataCommand) { IVolume volume = dataCommand.GetDevice() as IVolume; if (volume != null) { volume.DecrementVolume(); } }
public void Execute(IDataCommand dataCommand) { IVolume volume = dataCommand.GetDevice() as IVolume; if (volume != null) { volume.IncrementVolume(); } }
public void Execute(IDataCommand dataCommand) { IOnOff onOff = dataCommand.GetDevice() as IOnOff; if (onOff != null) { onOff.Off(); } }
public void Execute(IDataCommand dataCommand) { HouseCinema control = dataCommand.GetDevice() as HouseCinema; if (control != null) { control.OnOffDvd(); } }
public void Execute(IDataCommand dataCommand) { IClimatControl control = dataCommand.GetDevice() as IClimatControl; if (control != null) { control.Auto = !control.Auto; } }
public void Execute(IDataCommand dataCommand) { ClimatControl control = dataCommand.GetDevice() as ClimatControl; if (control != null) { control.OnOffCond(); } }
public void Undo(IDataCommand dataCommand) { ITemperature control = dataCommand.GetDevice() as ITemperature; if (control != null) { control.IncrementTemperature(); } }
public void Execute(IDataCommand dataCommand) { ITemperature control = dataCommand.GetDevice() as ITemperature; if (control != null) { control.DecrementTemperature(); } }
public void Execute(IDataCommand dataCommand) { IOnOff onOff = dataCommand.GetDevice() as IOnOff; if (onOff != null) { onOff.Off(); } }
public void Undo(IDataCommand dataCommand) { IOnOff onOff = dataCommand.GetDevice() as IOnOff; if (onOff != null) { onOff.On(); } }
public void Execute(IDataCommand dataCommand) { IVolume volume = dataCommand.GetDevice() as IVolume; if (volume != null) { volume.IncrementVolume(); } }
public void Undo(IDataCommand dataCommand) { IVolume volume = dataCommand.GetDevice() as IVolume; if (volume != null) { volume.DecrementVolume(); } }
public void Execute(IDataCommand dataCommand) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.IncrementLight(); } }
public void Undo(IDataCommand dataCommand) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.DecrementLight(); } }
public void Execute(IDataCommand dataCommand) { if (!string.IsNullOrEmpty(dataCommand.Value)) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.Brightness = (LightsState)Enum.Parse(typeof(LightsState), dataCommand.Value); } } }
public void Execute(IDataCommand dataCommand) { if (!string.IsNullOrEmpty(dataCommand.Value)) { ILight light = dataCommand.GetDevice() as ILight; if (light != null) { light.Brightness = (LightsState) Enum.Parse(typeof (LightsState), dataCommand.Value); } } }
public void Undo(IDataCommand dataCommand) { Device dev = dataCommand.GetDevice(); if (dev != null) { Room room = dataCommand.GetRoom(); if (room != null) { room.AddDevice(dev); } } }
public void Execute(IDataCommand dataCommand) { Device dev = dataCommand.GetDevice(); if (dev != null) { Room room = dataCommand.GetRoom(); if (room != null) { room.DeleteDevice(dataCommand.DeviceData); } } }
public void Execute(IDataCommand dataCommand) { Device dev = dataCommand.GetDevice(); if (dev != null) { Room room = dataCommand.GetRoom(); if (room != null) { room.DeleteDevice(dataCommand.DeviceData); } } }
public void Undo(IDataCommand dataCommand) { Device dev = dataCommand.GetDevice(); if (dev != null) { Room room = dataCommand.GetRoom(); if (room != null) { room.AddDevice(dev); } } }