From 5f41b0bc190c8f7ba9b4f6d015b48b2a6039b7f8 Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期四, 19 十二月 2024 16:43:39 +0800
Subject: [PATCH] 入参

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/06-mark/SimulationMarkHelper.cs |   52 +++++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/06-mark/SimulationMarkHelper.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/06-mark/SimulationMarkHelper.cs
index 5d60ccd..41faccb 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/06-mark/SimulationMarkHelper.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/06-mark/SimulationMarkHelper.cs
@@ -4,20 +4,22 @@
 namespace HStation.WinFrmUI
 {
     /// <summary>
-    /// 
+    /// 姘村姏妯℃嫙鏍囨敞杈呭姪绫�
     /// </summary>
     public class SimulationMarkHelper
     {
         /// <summary>
         /// 
         /// </summary>
-        public SimulationMarkHelper(SimulationVisualListHelper visualListHelper, ISimulationMarkView view)
+        public SimulationMarkHelper(SimulationVisualListHelper visualListHelper, SimulationCalcuResultHelper calcuResultHelper, ISimulationMarkView view)
         {
             _visualListHelper = visualListHelper;
+            _calcuResultHelper = calcuResultHelper;
             _views = new List<ISimulationMarkView>() { view };
         }
 
         private SimulationVisualListHelper _visualListHelper = null;//鍙鍒楄〃杈呭姪绫�
+        private SimulationCalcuResultHelper _calcuResultHelper = null;//璁$畻缁撴灉杈呭姪绫�
         private List<ISimulationMarkView> _views = null;//瑙嗗浘鍒楄〃
 
         /// <summary>
@@ -69,7 +71,7 @@
             {
                 if (_results == null)
                 {
-                    _results = HydroMarkHelper.GetResultList(_visualListHelper.HydroInfo, this.Sets);
+                    _results = HydroMarkHelper.GetResultList(_visualListHelper.HydroInfo, this.Sets, _calcuResultHelper.GetVisualDict());
                     if (_results == null)
                     {
                         _results = new List<HydroMarkResultViewModel>();
@@ -98,15 +100,31 @@
         }
 
         /// <summary>
-        /// 鏇存柊
+        /// 璁剧疆
         /// </summary>
-        public void Update(HydroVisualInfo visual)
+        public void Set()
+        {
+            if (this.Visible)
+            {
+                var leadLabels = this.Results?.Select(x => new LogicMarkLeadLabel(x.Code, x.Text, null)).ToList();
+                _views?.ForEach(x => x.SetLogicMarkLeadLabels(leadLabels));
+            }
+            else
+            {
+                _views?.ForEach(x => x.ClearLogicMarkLeadLabels());
+            }
+        }
+
+        /// <summary>
+        /// 璁剧疆
+        /// </summary>
+        public void Set(HydroVisualInfo visual)
         {
             if (visual == null)
             {
                 return;
             }
-            var result = HydroMarkHelper.GetResult(visual, this.Sets);
+            var result = HydroMarkHelper.GetResult(visual, this.Sets, _calcuResultHelper.GetVisualDict());
             if (result == null)
             {
                 return;
@@ -121,31 +139,15 @@
         }
 
         /// <summary>
-        /// 鏇存柊
+        /// 璁剧疆
         /// </summary>
-        public void Update(List<HydroVisualInfo> visuals)
+        public void Set(List<HydroVisualInfo> visuals)
         {
             if (visuals == null || visuals.Count < 1)
             {
                 return;
             }
-            visuals.ForEach(x => Update(x));
-        }
-
-        /// <summary>
-        /// 璁剧疆
-        /// </summary>
-        public void Set()
-        {
-            if (this.Visible)
-            {
-                var leadLabels = this.Results?.Select(x => new LogicMarkLeadLabel(x.Code, x.Text, null)).ToList();
-                _views?.ForEach(x => x.SetLogicMarkLeadLabels(leadLabels));
-            }
-            else
-            {
-                _views?.ForEach(x => x.ClearLogicMarkLeadLabels());
-            }
+            visuals.ForEach(x => Set(x));
         }
 
 

--
Gitblit v1.9.3