From 8486fdaaf94faddbf7e475c660726f9a71b72a4b Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期一, 02 十二月 2024 21:14:07 +0800
Subject: [PATCH] 修复phart问题

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/03-pipe/SetSchemePipeListCtrl.cs |   41 +++++++++++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/03-pipe/SetSchemePipeListCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/03-pipe/SetSchemePipeListCtrl.cs
index dd86a26..5fcdcca 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/03-pipe/SetSchemePipeListCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/04-scheme/01-add/01-set/03-pipe/SetSchemePipeListCtrl.cs
@@ -33,7 +33,12 @@
         /// 姘村姏鏀瑰彉浜嬩欢
         /// </summary>
         public event Action<List<HydroParterInfo>> HydroChangedEvent;
-        
+
+
+        /// <summary>
+        /// 姘村姏璁板綍鏀瑰彉浜嬩欢
+        /// </summary>
+        public event Action<SetSchemeParterRecord> HydroRecordChangedEvent;
 
         /// <summary>
         /// 鏄剧ず鏌ヨ闈㈡澘
@@ -67,7 +72,7 @@
         /// </summary>
         public void SetBindingData(HydroModelInfo hydroInfo)
         {
-            _hydroInfo=hydroInfo;
+            _hydroInfo = hydroInfo;
             _allList = new List<HydroPipeViewModel>();
             if (hydroInfo != null && hydroInfo.Pipes != null && hydroInfo.Pipes.Count > 0)
             {
@@ -83,7 +88,7 @@
         /// <summary>
         /// 缁戝畾鏁版嵁
         /// </summary>
-        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuResult> allCalcuResultList)
+        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResultList)
         {
             _allList = new List<HydroPipeViewModel>();
             if (hydroInfo != null && hydroInfo.Pipes != null && hydroInfo.Pipes.Count > 0)
@@ -164,7 +169,7 @@
         /// <summary>
         /// 鏇存柊璁$畻灞炴��
         /// </summary>
-        public void UpdateCalcuProperty(List<HydroCalcuResult> allCalcuResultList)
+        public void UpdateCalcuProperty(List<HydroCalcuVisualResult> allCalcuResultList)
         {
             if (allCalcuResultList != null && allCalcuResultList.Count > 0)
             {
@@ -221,7 +226,7 @@
 
         //璁剧疆
         private void SelectChange()
-        { 
+        {
             Search();
             var row = this.gridView1.GetFocusedRow() as HydroPipeViewModel;
             if (row == null)
@@ -230,9 +235,9 @@
                 return;
             }
 
-          
+
         }
-         
+
 
         private void gridView1_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
         {
@@ -255,7 +260,23 @@
                         row.UpdateProperty();
                         this.gridView1.RefreshRow(e.RowHandle);
                         this.HydroChangedEvent?.Invoke(new List<Yw.Model.HydroParterInfo>() { row.Vmo });
-                    } 
+
+                        var record = new SetSchemeParterRecord();
+                        record.Name = row.Vmo.Name;
+                        record.Code = row.Vmo.Code;
+                        record.Catalog = Yw.Hydro.ParterCatalog.Pipe;
+                        record.MatchingModel = output;
+
+                        record.Items = new List<SetSchemeParterRecordItem>() {
+                        new() {Name="鍨嬪彿",BeforeValue=$"{output.ModelType}",AfterValue=$"{output.MatchingModelType}"},
+                        new() {Name="鏉愭枡",BeforeValue=$"{output.Material}",AfterValue=$"{output.MatchingMaterial}"},
+                        new() {Name="鐩村緞锛坢m锛�",BeforeValue=$"{output.Diameter}",AfterValue=$"{output.MatchingDiameter}"},
+                        new() {Name="绮楃硻绯绘暟",BeforeValue=$"{output.Roughness}",AfterValue=$"{output.MatchingRoughness}"},
+                        new() {Name="灞�闃荤郴鏁�",BeforeValue=$"{output.MinorLoss}",AfterValue=$"{output.MatchingMinorLoss}"},
+                        };
+                        this.HydroRecordChangedEvent?.Invoke(record);
+                    }
+
                 };
                 dlg.ShowDialog();
             }
@@ -266,8 +287,8 @@
         }
 
 
-       
 
-         
+
+
     }
 }

--
Gitblit v1.9.3