From 80ec78f9c85466b09ac4a4101d5073c26f37021e Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期一, 06 一月 2025 09:14:32 +0800
Subject: [PATCH] 水力计算bug修复

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs |   28 ++++++++++++++++++++++++----
 1 files changed, 24 insertions(+), 4 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
index 84467d2..6a21a93 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -223,6 +223,24 @@
             this.barBtnSetCompressorList.ImageOptions.AllowGlyphSkinning = DevExpress.Utils.DefaultBoolean.True;
         }
 
+        #region 灞炴�х姸鎬�
+
+        //灞炴�х姸鎬佽緟鍔╃被
+        private HydroPropStatusHelper _propStatusHelper = null;
+
+        //鑾峰彇灞炴�х姸鎬佽緟鍔╃被
+        private async Task<HydroPropStatusHelper> GetPropStatusHelper()
+        {
+            if (_propStatusHelper == null)
+            {
+                var allPropStatusList = await BLLFactory<Yw.BLL.HydroParterPropStatusInfo>.Instance.GetByModelID(_hydroInfo.ID);
+                _propStatusHelper = new HydroPropStatusHelper(_hydroInfo, allPropStatusList);
+            }
+            return _propStatusHelper;
+        }
+
+        #endregion
+
         #region BIM鎺т欢
 
         //bimface鎺т欢
@@ -310,7 +328,7 @@
         private SimulationPropertyCtrl _propertyCtrl = null;
 
         //鑾峰彇灞炴�ф帶浠�
-        private SimulationPropertyCtrl GetPropertyCtrl()
+        private async Task<SimulationPropertyCtrl> GetPropertyCtrl()
         {
             if (_hydroInfo == null)
             {
@@ -318,9 +336,11 @@
             }
             if (_propertyCtrl == null)
             {
+                var propStatusHelper = await GetPropStatusHelper();
                 _propertyCtrl = new SimulationPropertyCtrl();
                 _propertyCtrl.Dock = DockStyle.Fill;
                 _propertyCtrl.AllowEdit = true;
+                _propertyCtrl.InitialData(propStatusHelper);
                 _propertyCtrl.CalcuResult = () => GetCalcuResult();
                 _propertyCtrl.HydroViewEvent += (visual) =>
                 {
@@ -418,13 +438,13 @@
         }
 
         //鏄剧ず灞炴�ф帶浠�
-        private void ShowPropertyCtrl()
+        private async void ShowPropertyCtrl()
         {
             if (IsPropertyCtrlVisible)
             {
                 return;
             }
-            var propertyCtrl = GetPropertyCtrl();
+            var propertyCtrl = await GetPropertyCtrl();
             this.controlContainerRight.Controls.Clear();
             this.controlContainerRight.Controls.Add(propertyCtrl);
             this.docPnlRight.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible;
@@ -448,7 +468,7 @@
             _propertyCtrl?.UpdateRows();
         }
 
-        #endregion 灞炴�ф帶浠�
+        #endregion
 
         #region 閫夋嫨鏋勪欢
 

--
Gitblit v1.9.3