/// <summary> /// KNXImageButton 转 ImageButtonNode /// </summary> /// <param name="knx"></param> public ImageButtonNode(KNXImageButton knx, BackgroundWorker worker) : base(knx, worker) { this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxImageButtonType; SetText(this.Title); this.ReadAddressId = knx.ReadAddressId ?? new Dictionary <string, KNXSelectedAddress>(); this.WriteAddressIds = knx.WriteAddressIds ?? new Dictionary <string, KNXSelectedAddress>(); if (ImportedHelper.IsLessThan2_5_6()) { this.ImageOn = ProjResManager.CopyImageSole(Path.Combine(this.ImagePath, NAME_IMAGEON)); this.ImageOff = ProjResManager.CopyImageSole(Path.Combine(this.ImagePath, NAME_IMAGEOFF)); } else { this.ImageOn = knx.ImageOn; this.ImageOff = knx.ImageOff; } if (ImportedHelper.IsLessThan2_7_1()) { this.Alpha = .0f; } }