Exemplo n.º 1
0
        public KNXSceneButton ToKnx()
        {
            var knx = new KNXSceneButton();

            base.ToKnx(knx);

            knx.ReadAddressId = this.ReadAddressId;
            knx.WriteAddressIds = this.WriteAddressIds;

            knx.ImageOn = this.ImageOn;
            knx.ColorOn = FrmMainHelp.ColorToHexStr(this.ColorOn);// this.ColorOn;
            knx.ImageOff = this.ImageOff;
            knx.ColorOff = FrmMainHelp.ColorToHexStr(this.ColorOff);// this.ColorOff;
            knx.IsGroup = (int)this.IsGroup;
            knx.DefaultValue = this.DefaultValue;

            return knx;
        }
Exemplo n.º 2
0
        public SceneButtonNode(KNXSceneButton knx)
            : base(knx)
        {
            this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxSceneButtonType;

            this.ReadAddressId = knx.ReadAddressId ?? new Dictionary<string, KNXSelectedAddress>();
            this.WriteAddressIds = knx.WriteAddressIds ?? new Dictionary<string, KNXSelectedAddress>();

            this.ImageOn = knx.ImageOn;
            this.ColorOn = FrmMainHelp.HexStrToColor(knx.ColorOn);// knx.ColorOn;
            this.ImageOff = knx.ImageOff;
            this.ColorOff = FrmMainHelp.HexStrToColor(knx.ColorOff);// knx.ColorOff;
            this.IsGroup = (EBool)Enum.ToObject(typeof(EBool), knx.IsGroup);
            this.DefaultValue = knx.DefaultValue;
        }