public KNXSliderSwitch ToKnx() { var knx = new KNXSliderSwitch(); base.ToKnx(knx); knx.ReadAddressId = this.ReadAddressId; knx.WriteAddressIds = this.WriteAddressIds; knx.LeftImage = this.LeftImage; knx.RightImage = this.RightImage; knx.SliderImage = this.SliderImage; knx.IsRelativeControl = (int)this.IsRelativeControl; return knx; }
public SliderSwitchNode(KNXSliderSwitch knx) : base(knx) { this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxSliderSwitchType; this.ReadAddressId = knx.ReadAddressId ?? new Dictionary<string, KNXSelectedAddress>(); this.WriteAddressIds = knx.WriteAddressIds ?? new Dictionary<string, KNXSelectedAddress>(); this.LeftImage = knx.LeftImage; this.RightImage = knx.RightImage; this.SliderImage = knx.SliderImage; this.IsRelativeControl = (EBool)Enum.ToObject(typeof(EBool), knx.IsRelativeControl); }