| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查看水箱事件 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroWaterboxInfo> ViewWaterboxEvent; |
| | | |
| | | /// <summary> |
| | | /// 页面状态发生改变 |
| | | /// </summary> |
| | | public event Action PageStateChangedEvent; |
| | |
| | | { |
| | | this.tabPanelCore.Rows.Add(new TablePanelRow(TablePanelEntityStyle.AutoSize, 150F)); |
| | | var ctrl = new SetWaterboxCalcuPrefixCtrl(); |
| | | // ctrl.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; |
| | | ctrl.SetBindingData(_vm.HydroInfo.Waterboxs[i]); |
| | | //ctrl.Size = new Size(); |
| | | ctrl.Anchor = AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right; |
| | | ctrl.ViewEvent += (waterbox) => |
| | | { |
| | | if (waterbox == null) |
| | | { |
| | | return; |
| | | } |
| | | this.ViewWaterboxEvent?.Invoke(waterbox); |
| | | }; |
| | | _allCalcuPrefixCtrlList.Add(ctrl); |
| | | this.tabPanelCore.Controls.Add(ctrl); |
| | | this.tabPanelCore.SetCell(ctrl, i, 0); |
| | | } |
| | | this.tabPanelCore.Rows.Add(new TablePanelRow(TablePanelEntityStyle.AutoSize, 150F)); |
| | | } |
| | | } |
| | | if (_vm.HydroInfo.Waterboxs != null && _vm.HydroInfo.Waterboxs.Count == _allCalcuPrefixCtrlList.Count) |
| | | { |
| | | for (int i = 0; i < _allCalcuPrefixCtrlList.Count; i++) |
| | | { |
| | | _allCalcuPrefixCtrlList[i].SetBindingData(_vm.HydroInfo.Waterboxs[i]); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //允许上一步 |
| | | //更新页面 |
| | | private void UpdatePage() |
| | | { |
| | | if (_allCalcuPrefixCtrlList == null) |
| | | { |
| | | return; |
| | | } |
| | | _allCalcuPrefixCtrlList.ForEach(x => x.UpdateBindingData()); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 允许上一步 |
| | | /// </summary> |
| | | public bool AllowPrev |
| | | { |
| | | get |
| | |
| | | } |
| | | } |
| | | |
| | | //允许上一步 |
| | | /// <summary> |
| | | /// 允许上一步 |
| | | /// </summary> |
| | | public bool AllowNext |
| | | { |
| | | get |
| | |
| | | } |
| | | } |
| | | |
| | | //允许取消 |
| | | /// <summary> |
| | | /// 允许取消 |
| | | /// </summary> |
| | | public bool AllowCancel |
| | | { |
| | | get { return true; } |
| | | } |
| | | |
| | | //允许完成 |
| | | /// <summary> |
| | | /// 允许完成 |
| | | /// </summary> |
| | | public bool AllowComplete |
| | | { |
| | | get { return true; } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 能否上一步 |
| | | /// </summary> |
| | | public bool CanPrev() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 能否下一步 |
| | | /// </summary> |
| | | public bool CanNext() |
| | | { |
| | | UpdatePage(); |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 能否取消 |
| | | /// </summary> |
| | | public bool CanCancel() |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 能否完成 |
| | | /// </summary> |
| | | public bool CanComplete() |
| | | { |
| | | UpdatePage(); |
| | | return true; |
| | | } |
| | | |