예제 #1
0
        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;
        }
예제 #2
0
        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);
        }