| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.Utils.Layout; |
| | | using DevExpress.XtraEditors; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.ComponentModel; |
| | |
| | | { |
| | | InitializeComponent(); |
| | | } |
| | | /// <summary> |
| | | /// 页面状态发生改变 |
| | | /// </summary> |
| | | public event Action PageStateChangedEvent; |
| | | |
| | | //单独控件高度 |
| | | private const int SingleContorlHeight = 145; |
| | | private SetHydroCalcuPrefixViewModel _vm = null; |
| | | private List<SetPumpCalcuPrefixCtrl> _allCalcuPrefixCtrlList = null; |
| | | |
| | | public bool AllowPrev { get { return true; } } |
| | | |
| | |
| | | |
| | | public bool AllowComplete { get { return true; } } |
| | | |
| | | public event Action PageStateChangedEvent; |
| | | |
| | | public void InitialPage(SetHydroCalcuPrefixViewModel t) |
| | | /// <summary> |
| | | /// 初始化页面 |
| | | /// </summary> |
| | | public void InitialPage(SetHydroCalcuPrefixViewModel vm) |
| | | { |
| | | _vm = vm; |
| | | InitialControls(); |
| | | } |
| | | |
| | | //初始化控件 |
| | | private void InitialControls() |
| | | { |
| | | if (_vm == null) |
| | | { |
| | | return; |
| | | } |
| | | if (_allCalcuPrefixCtrlList == null) |
| | | { |
| | | _allCalcuPrefixCtrlList = new List<SetPumpCalcuPrefixCtrl>(); |
| | | this.tabPanelCore.Columns.Add(new TablePanelColumn(TablePanelEntityStyle.Relative, 55F)); |
| | | if (_vm.HydroInfo.Pumps != null && _vm.HydroInfo.Pumps.Count > 0) |
| | | { |
| | | for (int i = 0; i < _vm.HydroInfo.Pumps.Count; i++) |
| | | { |
| | | this.tabPanelCore.Rows.Add(new TablePanelRow(TablePanelEntityStyle.AutoSize, 150F)); |
| | | var ctrl = new SetPumpCalcuPrefixCtrl(); |
| | | // ctrl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; |
| | | ctrl.SetBindingData(_vm.HydroInfo.Pumps[i]); |
| | | //ctrl.Size = new Size(); |
| | | this.tabPanelCore.Controls.Add(ctrl); |
| | | this.tabPanelCore.SetCell(ctrl, i, 0); |
| | | } |
| | | this.tabPanelCore.Rows.Add(new TablePanelRow(TablePanelEntityStyle.AutoSize, 150F)); |
| | | } |
| | | } |
| | | } |
| | | |
| | | public bool CanPrev() |