From c2bb91cc8706cdeb18b0835a36a4266891daccf3 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期二, 29 十月 2024 10:51:16 +0800 Subject: [PATCH] 计算修改 --- 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