From facdda630bc2a16c2a61e5db6e4387e257202d44 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期三, 15 一月 2025 11:40:38 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs | 67 ++++++++++++++++++++++----------- 1 files changed, 44 insertions(+), 23 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs index 21e8c58..ecb3f89 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/SimulationPropertyCtrl.cs @@ -1,8 +1,4 @@ -锘縰sing DevExpress.Utils.MVVM; -using HStation.WinFrmUI.PhartRelation; -using HStation.WinFrmUI.Xhs; -using Yw.Model; -using Yw.WinFrmUI.HydroW3d; +锘縰sing Yw.Model; namespace HStation.WinFrmUI { @@ -22,10 +18,9 @@ this.hydroVisualPropertyCtrl1.PropertyValueChangedEvent += HydroVisualPropertyCtrl1_PropertyValueChangedEvent; this.hydroVisualPropertyCtrl1.MarkPropertyValueChangedEvent += HydroVisualPropertyCtrl1_MarkPropertyValueChangedEvent; this.hydroVisualPropertyCtrl1.GradingPropertyValueChangedEvent += HydroPVisualPropertyCtrl1_GradingPropertyValueChangedEvent; - this.hydroVisualPropertyCtrl1.FlowEffectPropertyValueChangedEvent += HydroVisualPropertyCtrl1_FlowEffectPropertyValueChangedEvent; } - #region 浜嬩欢闆� + #region 浜嬩欢闆嗗悎 /// <summary> /// 鏋勪欢鏌ョ湅浜嬩欢 @@ -54,12 +49,22 @@ /// </summary> public event Action<HydroVisualInfo> GradingPropertyValueChangedEvent; - /// <summary> - /// 姘存祦鍔ㄧ敾灞炴�у�兼敼鍙樹簨浠� - /// </summary> - public event Action<HydroVisualInfo> FlowEffectPropertyValueChangedEvent; + private HydroChangeHelper _changeHelper = null;//鏀瑰彉杈呭姪绫� + private HydroPropStatusHelper _propStatusHelper = null;//灞炴�х姸鎬佽緟鍔╃被 - #endregion 浜嬩欢闆� + #endregion + + /// <summary> + /// 鍒濆鍖栨暟鎹� + /// </summary> + public void InitialData + ( + HydroChangeHelper changeHelper, + HydroPropStatusHelper propStatusHelper + ) + { + this.hydroVisualPropertyCtrl1.InitialData(changeHelper, propStatusHelper); + } #region 灞炴�ц祴鍊� @@ -86,7 +91,7 @@ /// </summary> public Func<HydroCalcuResult> CalcuResult { get; set; } - #endregion 灞炴�ц祴鍊� + #endregion #region 灞炴�ф洿鏂� @@ -120,7 +125,7 @@ this.hydroVisualPropertyCtrl1.UpdateRows(); } - #endregion 灞炴�ф洿鏂� + #endregion #region 浜嬩欢瀹炵幇 @@ -212,7 +217,7 @@ var dlg = new AssetsThreelinkSingleMatchingDlg(); dlg.ReloadDataEvent += (output) => { - HydroMatchingHelper.Apply(threelinkViewModel, output); + HydroMatchingHelper.Apply(threelinkViewModel, output, _changeHelper, _propStatusHelper); this.hydroVisualPropertyCtrl1.UpdateRows(); this.PropertyValueChangedEvent?.Invoke(vm.Vmo); this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); @@ -331,6 +336,24 @@ } break; + case Yw.Hydro.ParterCatalog.Cooling: + { + var coolingViewModel = vm as HydroCoolingViewModel; + var input = HydroMatchingHelper.Create(coolingViewModel); + var dlg = new AssetsCoolingSingleMatchingDlg(); + dlg.ReloadDataEvent += (output) => + { + HydroMatchingHelper.Apply(coolingViewModel, output); + this.hydroVisualPropertyCtrl1.UpdateRows(); + this.PropertyValueChangedEvent?.Invoke(vm.Vmo); + this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); + this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); + }; + dlg.SetBindingData(input); + dlg.ShowDialog(); + } + break; + case Yw.Hydro.ParterCatalog.Pipe: { var pipeViewModel = vm as HydroPipeViewModel; @@ -344,6 +367,7 @@ this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); this.GradingPropertyValueChangedEvent?.Invoke(vm.Vmo); }; + dlg.SetBindingData(input); dlg.ShowDialog(); } break; @@ -355,7 +379,7 @@ var dlg = new SimulationPumpSingleMatchingDlg(); dlg.ReloadDataEvent += (output) => { - HydroMatchingHelper.Apply(pumpViewModel, output); + HydroMatchingHelper.Apply(pumpViewModel, output, _changeHelper, _propStatusHelper); this.hydroVisualPropertyCtrl1.UpdateRows(); this.PropertyValueChangedEvent?.Invoke(vm.Vmo); this.MarkPropertyValueChangedEvent?.Invoke(vm.Vmo); @@ -517,7 +541,7 @@ } } - #endregion 浜嬩欢瀹炵幇 + #endregion #region 浜嬩欢绌块�� @@ -559,12 +583,9 @@ this.GradingPropertyValueChangedEvent?.Invoke(vm?.Vmo); } - //姘存祦鍔ㄧ敾灞炴�у彂鐢熸敼鍙� - private void HydroVisualPropertyCtrl1_FlowEffectPropertyValueChangedEvent(HydroVisualViewModel vm) - { - this.FlowEffectPropertyValueChangedEvent?.Invoke(vm?.Vmo); - } - #endregion 浜嬩欢绌块�� + #endregion + + } } \ No newline at end of file -- Gitblit v1.9.3