From d714285ed0175ca438a01e5252feb67119491fe0 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 29 十一月 2024 22:33:47 +0800 Subject: [PATCH] 构件明细优化 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs | 45 +++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 43 insertions(+), 2 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs index 8d4364d..981e94e 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/02-emitter/00-core/HydroEmitterViewModel.cs @@ -15,6 +15,10 @@ /// </summary> public HydroEmitterViewModel(Yw.Model.HydroEmitterInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo) { + this.Material = rhs.Material; + this.UpdatePropStatus(nameof(this.Material), rhs, nameof(rhs.Material)); + this.Caliber = rhs.Caliber; + this.UpdatePropStatus(nameof(this.Caliber), rhs, nameof(rhs.Caliber)); this.Coefficient = rhs.Coefficient; this.UpdatePropStatus(nameof(this.Coefficient), rhs, nameof(rhs.Coefficient)); @@ -22,11 +26,32 @@ } /// <summary> + /// 鏉愭枡 + /// </summary> + [Category("鏁版嵁")] + [DisplayName("鏉愭枡")] + [Display(Name = "鏉愭枡")] + [PropertyOrder(3001)] + [Browsable(true)] + public string Material { get; set; } + + /// <summary> + /// 鍙e緞 + /// </summary> + [Category("鏁版嵁")] + [DisplayName("鍙e緞")] + [Display(Name = "鍙e緞(mm)")] + [DisplayUnit("mm")] + [PropertyOrder(3002)] + [Browsable(true)] + public double? Caliber { get; set; } + + /// <summary> /// 鍠峰皠绯绘暟 /// </summary> [Category("鏁版嵁")] [DisplayName("鍠峰皠绯绘暟")] - [PropertyOrder(1001)] + [PropertyOrder(3003)] [Browsable(true)] public virtual double Coefficient { get; set; } @@ -42,11 +67,27 @@ public override void UpdateProperty() { base.UpdateProperty(); + this.Material = this.Vmo.Material; + this.UpdatePropStatus(nameof(this.Material), this.Vmo, nameof(this.Vmo.Material)); + this.Caliber = this.Vmo.Caliber; + this.UpdatePropStatus(nameof(this.Caliber), this.Vmo, nameof(this.Vmo.Caliber)); this.Coefficient = this.Vmo.Coefficient; this.UpdatePropStatus(nameof(this.Coefficient), this.Vmo, nameof(this.Vmo.Coefficient)); } - + /// <summary> + /// + /// </summary> + public override void UpdateVmoProperty() + { + base.UpdateVmoProperty(); + this.Vmo.Material = this.Material; + this.Vmo.UpdatePropStatus(nameof(this.Vmo.Material), this, nameof(this.Material)); + this.Vmo.Caliber = this.Caliber; + this.Vmo.UpdatePropStatus(nameof(this.Vmo.Caliber), this, nameof(this.Caliber)); + this.Vmo.Coefficient = this.Coefficient; + this.Vmo.UpdatePropStatus(nameof(this.Vmo.Coefficient), this, nameof(this.Coefficient)); + } } } -- Gitblit v1.9.3