From 8b3c150ccc930e334f787f85db75784a54f08b0f Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期二, 15 十月 2024 14:32:25 +0800
Subject: [PATCH] 性能曲线

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs               |    1 +
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs                                                 |    2 +-
 WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-perform-compare/PumpPerformCompareChart.cs |   44 +++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 41 insertions(+), 6 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
index ad7b9ac..09b1f0f 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/01-property/XhsProjectSimulationPropertyCtrl.cs
@@ -240,6 +240,7 @@
                             detailDlg.ShowDialog();
                             return;
                         }
+
                         var dlg = new PumpSingleMatchingDlg();
                         dlg.SetBindingData(input);
                         dlg.ReloadDataEvent += (rhs) =>
diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs
index a00c9a1..a83edc0 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/PumpFullInfoCtrl.cs
@@ -4,7 +4,7 @@
 
 namespace HStation.WinFrmUI
 {
-    public partial class PumpFullInfoCtrl : DevExpress.XtraEditors.XtraUserControl
+    public partial class PumpFullInfoCtrl : DocumentPage
     {
         #region 鏋勯�犲嚱鏁板拰鍔犺浇鍑芥暟
 
diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-perform-compare/PumpPerformCompareChart.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-perform-compare/PumpPerformCompareChart.cs
index 9f7b3e2..8ad5d00 100644
--- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-perform-compare/PumpPerformCompareChart.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-perform-compare/PumpPerformCompareChart.cs
@@ -810,6 +810,11 @@
 
             var minQ = _qh_pt_list.Min(x => x.X);
             var maxQ = _qh_pt_list.Max(x => x.X);
+            if (_qh_wk != null)
+            {
+                minQ = _qh_wk.MinX;
+                maxQ = _qh_wk.MaxX;
+            }
 
             if (workQ == null)
             {
@@ -821,8 +826,38 @@
                     return;
             }
 
-            _work_point.Q = workQ.Value;
-            _work_point.H = _qh.GetPointY(_work_point.Q);
+            double flow, head, power = 0, eff = 0;
+
+            flow = workQ.Value;
+            if (_qh_wk != null)
+            {
+                head = _qh_wk.GetPointY(flow);
+                if (_qp_wk != null)
+                {
+                    power = _qp_wk.GetPointY(flow);
+                }
+                if (_qe_wk != null)
+                {
+                    eff = _qe_wk.GetPointY(flow);
+                }
+            }
+            else
+            {
+                head = _qh.GetPointY(flow);
+
+                if (_qp != null)
+                {
+                    power = _qp.GetPointY(flow);
+                }
+                if (_qe != null)
+                {
+                    eff = _qe.GetPointY(flow);
+                }
+            }
+
+
+            _work_point.Q = flow;
+            _work_point.H = head;
 
 
             var workInfoStringBuilder = new StringBuilder();
@@ -830,13 +865,13 @@
             workInfoStringBuilder.AppendLine($"鎵▼:{_work_point.H.ToString("N1")} ");
             if (_qe != null)
             {
-                _work_point.E = _qe.GetPointY(_work_point.Q);
+                _work_point.E = eff;
                 workInfoStringBuilder.AppendLine($"鏁堢巼:{_work_point.E.ToString("N1")} ");
             }
 
             if (_qp != null)
             {
-                _work_point.P = _qp.GetPointY(_work_point.Q);
+                _work_point.P = power;
                 workInfoStringBuilder.Append($"鍔熺巼:{_work_point.P.ToString("N1")} ");
             }
 
@@ -856,7 +891,6 @@
             {
                 OnCalcQueryPoint(_work_point);
             }
-
         }
 
         /// <summary>

--
Gitblit v1.9.3