From 3b08b5c772ffc0c10644c1aaa9f7b2447582c858 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期一, 14 十月 2024 17:50:24 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-variable-speed/PumpVariableSpeedInfoCtrl.cs | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 insertions(+), 1 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-variable-speed/PumpVariableSpeedInfoCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-variable-speed/PumpVariableSpeedInfoCtrl.cs index 779db9b..cf8adc3 100644 --- a/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-variable-speed/PumpVariableSpeedInfoCtrl.cs +++ b/WinFrmUI/Yw.WinFrmUI.Phart.Core/01-perform/01-pump-chart/01-chart/02-variable-speed/PumpVariableSpeedInfoCtrl.cs @@ -32,6 +32,23 @@ private List<PumpVariableSpeedInfoViewModel> _all_binding_list = null; + public void SetBindingData(PumpVariableSpeedInfoViewModel item, Yw.Geometry.Point2d design_pt = null) + { + _all_binding_list = new List<PumpVariableSpeedInfoViewModel>(); + if (item != null) + { + _all_binding_list.Add(item); + } + + this.txtDesignQ.EditValue = design_pt?.X; + this.txtDesignH.EditValue = design_pt?.Y; + + this.pumpSerialParallelInfoViewModelBindingSource.DataSource = _all_binding_list; + this.pumpSerialParallelInfoViewModelBindingSource.ResetBindings(false); + this.gridView1.BestFitColumns(); + + } + public void SetBindingData(List<PumpVariableSpeedInfoViewModel> vm_list, Yw.Geometry.Point2d design_pt = null) { _all_binding_list = new List<PumpVariableSpeedInfoViewModel>(); @@ -122,7 +139,24 @@ } return _all_binding_list.Select(x => new PumpVariableSpeedInfoViewModel(x)).ToList(); } - + + /// <summary> + /// 鑾峰彇 + /// </summary> + public Yw.Geometry.Point2d GetDesignPoint() + { + + if (!double.TryParse(this.txtDesignQ.Text,out double x)) + { + return default; + } + if (!double.TryParse(this.txtDesignH.Text, out double y)) + { + return default; + } + return new Geometry.Point2d(x,y); + } + #region Color private List<Color> _color_array = new List<Color>() -- Gitblit v1.9.3