public ValueDisplayNode(KNXValueDisplay knx, BackgroundWorker worker) : base(knx, worker) { this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxValueDisplayType; SetText(this.Title); this.ReadAddressId = knx.ReadAddressId ?? new Dictionary <string, KNXSelectedAddress>(); if (ImportedHelper.IsLessThan2_1_8() && knx.Unit > (int)EMeasurementUnit.Centigrade) { this.Unit = (EMeasurementUnit)Enum.ToObject(typeof(EMeasurementUnit), knx.Unit - 1); } else { this.Unit = (EMeasurementUnit)Enum.ToObject(typeof(EMeasurementUnit), knx.Unit); } if (ImportedHelper.IsLessThan2_5_7()) { this.ValueFont = this.TitleFont.Clone(); } else { this.ValueFont = new STFont(knx.ValueFont); } this.DecimalDigit = (EDecimalDigit)Enum.ToObject(typeof(EDecimalDigit), knx.DecimalDigit); }
public ValueDisplayNode(KNXValueDisplay knx) : base(knx) { this.Unit = (EMeasurementUnit)Enum.ToObject(typeof(EMeasurementUnit), knx.Unit); this.Name = ImageKey = SelectedImageKey = MyConst.Controls.KnxValueDisplayType; this.ReadAddressId = knx.ReadAddressId ?? new Dictionary <string, KNXSelectedAddress>(); }
public KNXValueDisplay ToKnx() { var knx = new KNXValueDisplay(); base.ToKnx(knx); knx.ReadAddressId = this.ReadAddressId; knx.Unit = (int)this.Unit; return(knx); }
public KNXValueDisplay ExportTo(BackgroundWorker worker, string dir, Point RelPoint) { KNXValueDisplay knx = this.ToKnx(worker); knx.Left = this.LocationInPageFact.X - RelPoint.X; knx.Top = this.LocationInPageFact.Y - RelPoint.Y; knx.ReadAddressId.Clear(); return(knx); }
public KNXValueDisplay ToKnx(BackgroundWorker worker) { var knx = new KNXValueDisplay(); base.ToKnx(knx, worker); knx.ReadAddressId = this.ReadAddressId; knx.Unit = (int)this.Unit; knx.DecimalDigit = (int)this.DecimalDigit; knx.ValueFont = this.ValueFont.ToKnx(); return(knx); }
public ValueDisplayNode(KNXValueDisplay knx, BackgroundWorker worker, string DirSrcImg) : this(knx, worker) { this.Id = GenId(); // 创建新的Id }