From e411302bca8857e102443a5250c82b9580ef07a3 Mon Sep 17 00:00:00 2001 From: duheng <2286773002@qq.com> Date: 星期五, 28 三月 2025 10:49:48 +0800 Subject: [PATCH] 修改成套设备增加逻辑 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/02-visual/HydroVisualViewModel.cs | 65 ++++---------------------------- 1 files changed, 8 insertions(+), 57 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/02-visual/HydroVisualViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/02-visual/HydroVisualViewModel.cs index 350f349..1887d9d 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/02-visual/HydroVisualViewModel.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/02-visual/HydroVisualViewModel.cs @@ -3,7 +3,7 @@ /// <summary> /// 姘村姏鍙缁勪欢 /// </summary> - public class HydroVisualViewModel : HydroParterViewModel + public class HydroVisualViewModel : HydroParterViewModel, IHydroCalcuVisualResult { /// <summary> /// @@ -15,75 +15,26 @@ /// </summary> public HydroVisualViewModel(Yw.Model.HydroVisualInfo rhs, Yw.Model.HydroModelInfo hydroInfo) : base(rhs, hydroInfo) { - this.FlowDirection = rhs.FlowDirection; - this.UpdatePropStatus(nameof(this.FlowDirection), rhs, nameof(rhs.FlowDirection)); - this.FlowDirectionX = rhs.FlowDirectionX; - this.UpdatePropStatus(nameof(this.FlowDirectionX), rhs, nameof(rhs.FlowDirectionX)); - this.FlowDirectionY = rhs.FlowDirectionY; - this.UpdatePropStatus(nameof(this.FlowDirectionY), rhs, nameof(rhs.FlowDirectionY)); - this.Vmo = rhs; } - - /// <summary> - /// 娴佸悜 - /// </summary> - [Category("鎷撴墤缁撴瀯")] - [DisplayName("娴佸悜")] - [PropertyOrder(101)] - [Browsable(true)] - public virtual int FlowDirection { get; set; } - - /// <summary> - /// X娴佸悜 - /// </summary> - [Category("鎷撴墤缁撴瀯")] - [DisplayName("X娴佸悜")] - [PropertyOrder(102)] - [Browsable(true)] - public virtual int FlowDirectionX { get; set; } - - /// <summary> - /// Y娴佸悜 - /// </summary> - [Category("鎷撴墤缁撴瀯")] - [DisplayName("Y娴佸悜")] - [PropertyOrder(103)] - [Browsable(true)] - public virtual int FlowDirectionY { get; set; } /// <summary> /// vmo /// </summary> [Browsable(false)] - public new Yw.Model.HydroVisualInfo Vmo { get; set; } - - /// <summary> - /// 鏇存柊灞炴�� - /// </summary> - public override void UpdateProperty() + public new Yw.Model.HydroVisualInfo Vmo { - base.UpdateProperty(); - this.FlowDirection = this.Vmo.FlowDirection; - this.UpdatePropStatus(nameof(this.FlowDirection), this.Vmo, nameof(this.Vmo.FlowDirection)); - this.FlowDirectionX = this.Vmo.FlowDirectionX; - this.UpdatePropStatus(nameof(this.FlowDirectionX), this.Vmo, nameof(this.Vmo.FlowDirectionX)); - this.FlowDirectionY = this.Vmo.FlowDirectionY; - this.UpdatePropStatus(nameof(this.FlowDirectionY), this.Vmo, nameof(this.Vmo.FlowDirectionY)); + get { return _vmo as Yw.Model.HydroVisualInfo; } + set { _vmo = value; } } + /// <summary> - /// 鏇存柊 Vmo 灞炴�� + /// 鏇存柊璁$畻灞炴�� /// </summary> - public override void UpdateVmoProperty() + public virtual void UpdateCalcuProperty(HydroCalcuVisualResult rhs) { - base.UpdateVmoProperty(); - this.Vmo.FlowDirection = this.FlowDirection; - this.Vmo.UpdatePropStatus(nameof(this.Vmo.FlowDirection), this, nameof(this.FlowDirection)); - this.Vmo.FlowDirectionX = this.FlowDirectionX; - this.Vmo.UpdatePropStatus(nameof(this.Vmo.FlowDirectionX), this, nameof(this.FlowDirectionX)); - this.Vmo.FlowDirectionY = this.FlowDirectionY; - this.Vmo.UpdatePropStatus(nameof(this.Vmo.FlowDirectionY), this, nameof(this.FlowDirectionY)); + } -- Gitblit v1.9.3