| | |
| | | } |
| | | 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) |
| | | { |