public void Execute(IDataCommand dataCommand) { ClimatControl control = dataCommand.GetDevice() as ClimatControl; if (control != null) { control.OnOffCond(); } }
private void SetImageUrl() { ClimatControl climat = _data.Device as ClimatControl; if (_data.Device.State == StateOnOff.Off) { _imBt.ImageUrl = "~/Images/control_power.png"; } else { _imBt.ImageUrl = "~/Images/control_power_blue.png"; } if (climat != null && climat.Auto) { _imBtAuto.ImageUrl = "~/Images/AutoOn.png"; } else { _imBtAuto.ImageUrl = "~/Images/AutoOff.png"; } if (climat != null && climat.Heat.State == StateOnOff.Off) { _imBtHot.CssClass = "imgBt"; } else { _imBtHot.CssClass = "imgBt imgColor"; } if (climat != null && climat.Cond.State == StateOnOff.Off) { _imBtCond.CssClass = "imgBt"; } else { _imBtCond.CssClass = "imgBt imgColor"; } }