From d223e55ab6fc72d028bbbbb1057c83eacb4f1d2b Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期二, 29 十月 2024 12:08:08 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/Yw.WinFrmUI.Hydro.Core/11-prefix/02-pump/SetHydroPumpCalcuPrefixListCtrl.cs | 41 ++++++++++++++++++----------------------- 1 files changed, 18 insertions(+), 23 deletions(-) diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/11-prefix/02-pump/SetHydroPumpCalcuPrefixListCtrl.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/11-prefix/02-pump/SetHydroPumpCalcuPrefixListCtrl.cs index 8c858e7..1213973 100644 --- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/11-prefix/02-pump/SetHydroPumpCalcuPrefixListCtrl.cs +++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/11-prefix/02-pump/SetHydroPumpCalcuPrefixListCtrl.cs @@ -52,29 +52,24 @@ } if (_allCalcuPrefixCtrlList == null) { - //_allCalcuPrefixCtrlList = new List<SetHydroPumpCalcuPrefixCtrl>(); - //this.tablePanel.Rows.Add(new TablePanelRow(TablePanelEntityStyle.Relative, 55F)); - //if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0) - // { - // for (int i = 0; i < _hydroInfo.Pumps.Count; i++) - // { - // this.tablePanel.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.AutoSize, 250F)); - // var ctrl = new SetHydroPumpCalcuPrefixCtrl(); - // ctrl.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Bottom; - // ctrl.ViewParterEvent += (pump) => - // { - // if (pump == null) - // { - // return; - // } - // this.ViewParterEvent?.Invoke(pump); - // }; - // _allCalcuPrefixCtrlList.Add(ctrl); - // this.tablePanel.Controls.Add(ctrl); - // this.tablePanel.SetCell(ctrl, 0, i); - //} - //this.tablePanel.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.AutoSize, 150F)); - //} + _allCalcuPrefixCtrlList = new List<SetHydroPumpCalcuPrefixCtrl>(); + if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0) + { + for (int i = 0; i < _hydroInfo.Pumps.Count; i++) + { + var ctrl = new SetHydroPumpCalcuPrefixCtrl(); + ctrl.ViewParterEvent += (pump) => + { + if (pump == null) + { + return; + } + this.ViewParterEvent?.Invoke(pump); + }; + _allCalcuPrefixCtrlList.Add(ctrl); + this.flowLayoutPanel1.Controls.Add(ctrl); + } + } } if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count == _allCalcuPrefixCtrlList.Count) { -- Gitblit v1.9.3