From bb5865148234cad04ae31d4de9264f4209a3fa6d Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期四, 24 十月 2024 14:02:29 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/02-analy/SinglePumpAnalyInfoCtrl.cs |   38 ++++++++++++++++++++++----------------
 1 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/02-analy/SinglePumpAnalyInfoCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/02-analy/SinglePumpAnalyInfoCtrl.cs
index bb2c8c9..6f3f588 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/02-analy/SinglePumpAnalyInfoCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-pump/02-analy/SinglePumpAnalyInfoCtrl.cs
@@ -1,6 +1,4 @@
-锘縰sing Yw.WinFrmUI.Phart;
-
-namespace HStation.WinFrmUI.Xhs
+锘縩amespace HStation.WinFrmUI.Xhs
 {
     public partial class SinglePumpAnalyInfoCtrl : DevExpress.XtraEditors.XtraUserControl
     {
@@ -19,7 +17,7 @@
 
             this.colName.OptionsColumn.AllowEdit = false;
             this.colName.OptionsColumn.ReadOnly = true;
-            this.colName.Visible = false;
+
 
             this.colColor.OptionsColumn.AllowEdit = false;
             this.colColor.OptionsColumn.ReadOnly = true;
@@ -30,27 +28,30 @@
 
         }
 
-       
-
 
 
         /// <summary>
         /// 璁剧疆鏇茬嚎
         /// </summary> 
-        public event Action<string,double,double, Yw.Geometry.CubicSpline2d, Yw.Geometry.CubicSpline2d, Yw.Geometry.CubicSpline2d> SetEvent;
+        public event Action<string, double, double, Yw.Geometry.CubicSpline2d, Yw.Geometry.CubicSpline2d, Yw.Geometry.CubicSpline2d> SetEvent;
 
         /// <summary>
         /// 璁剧疆鏇茬嚎淇℃伅
         /// </summary> 
-        public event Action<string,Color> SetInfoEvent;
+        public event Action<string, Color> SetInfoEvent;
 
         /// <summary>
         /// 璁剧疆璁捐鐐�
         /// </summary> 
         public event Action<double, double> SetDesignPointEvent;
 
+        /// <summary>
+        /// 淇濆瓨浜嬩欢
+        /// </summary> 
+        public event Action<SinglePumpAnalyViewModel> SaveEvent;
+
         private List<SinglePumpAnalyViewModel> _all_binding_list = null;
-         
+
         public void SetBindingData(List<SinglePumpAnalyViewModel> vm_list)
         {
             _all_binding_list = new List<SinglePumpAnalyViewModel>();
@@ -65,7 +66,6 @@
             this.gridView2.BestFitColumns();
             this.gridView3.BestFitColumns();
         }
-
 
         public void SetDesignPoint(double flow, double head)
         {
@@ -112,7 +112,7 @@
                 }
             }
         }
-         
+
         //鍊煎彉鎹�
         private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
         {
@@ -127,7 +127,7 @@
                 vm.Calc();
                 this.singlePumpAnalyViewModelBindingSource.ResetBindings(false);
                 this.SetEvent?.Invoke(vm.Id, vm.CurrentHz, vm.ExtendRatio, vm.QhCalc, vm.QeCalc, vm.QpCalc);
-            } 
+            }
             else if (e.Column == this.colExtendRatio)
             {
                 var vm = this.gridView1.GetRow(e.RowHandle) as SinglePumpAnalyViewModel;
@@ -161,7 +161,7 @@
         /// 璁剧疆璁捐鐐逛俊鎭�
         /// </summary> 
         public void SetSectPointList(List<Yw.WinFrmUI.Phart.PumpSectPointViewModel> vm_list)
-        { 
+        {
             if (_all_binding_list == null || !_all_binding_list.Any())
                 return;
             _all_binding_list.ForEach(vm =>
@@ -173,11 +173,11 @@
 
                 var pt = vm_list?.Find(x => x.Id == vm.Id);
                 if (pt != null)
-                { 
+                {
                     vm.SectQ = pt.QueryQ;
                     vm.SectH = pt.QueryH;
                     vm.SectE = pt.QueryE;
-                    vm.SectP = pt.QueryP; 
+                    vm.SectP = pt.QueryP;
                 };
             });
             this.singlePumpAnalyViewModelBindingSource.ResetBindings(false);
@@ -194,6 +194,12 @@
             this.SetDesignPointEvent?.Invoke(design_q, design_h);
         }
 
-
+        private void btnSave_Click(object sender, EventArgs e)
+        {
+            if (XtraMessageBox.Show("鏄惁淇濆瓨鏁版嵁锛�", "鎻愮ず淇℃伅", MessageBoxButtons.YesNo, MessageBoxIcon.Information) != DialogResult.Yes)
+                return;
+            var vm = _all_binding_list.Last();
+            this.SaveEvent?.Invoke(vm);
+        }
     }
 }

--
Gitblit v1.9.3