| | |
| | | private List<DPumpHydr.WinFrmUI.Volute.TreeStepNode> _allStepNodes = null; |
| | | |
| | | private long _currentStepID = 0; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 下一步 |
| | | /// </summary> |
| | |
| | | { |
| | | return GoPrevStepCore(); |
| | | } |
| | | |
| | | ViewModel.HdrBaseInfo _hdrBaseInfo = null; |
| | | private bool GoNextStepCore() |
| | | { |
| | | var next_step = (from x in _allStepNodes |
| | |
| | | select x).FirstOrDefault(); |
| | | if (next_step == null) |
| | | return false; |
| | | |
| | | if(_currentStepID == Step_ID_Hdr_Base_Info) |
| | | { |
| | | string error_info; |
| | | var hdrBaseInfo = _ctrlHdrBaseInfo.GetBindingData(out error_info); |
| | | if(hdrBaseInfo == null) |
| | | { |
| | | MessageBox.Show(error_info); |
| | | return false; |
| | | } |
| | | _hdrBaseInfo = hdrBaseInfo; |
| | | } |
| | | SetParasCtrl(next_step.ID); |
| | | |
| | | return true; |
| | |
| | | { |
| | | if (_ctrlHdrBaseInfo == null) |
| | | _ctrlHdrBaseInfo = new ctrlHdrBaseInfo(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlHdrBaseInfo); |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlHdrBaseInfo); |
| | | } |
| | | if (step_id == Step_ID_Geom_Base_Info) |
| | | { |
| | | if (_ctrlGeomBaseInfo == null) |
| | | { |
| | | _ctrlGeomBaseInfo = new ctrlGeomBaseInfo(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlGeomBaseInfo); |
| | | _ctrlGeomBaseInfo.Name = "ctrlGeomBaseInfo"; |
| | | _ctrlGeomBaseInfo.Dock = DockStyle.Fill; |
| | | } |
| | | |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlGeomBaseInfo); |
| | | } |
| | | |
| | | |
| | |
| | | if (step_id == Step_ID_Section18_Base) |
| | | { |
| | | if (_ctrlSectionBaseInfo == null) |
| | | _ctrlSectionBaseInfo = new ctrlSectionBaseInfo(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlSectionBaseInfo); |
| | | { |
| | | _ctrlSectionBaseInfo = new ctrlSectionBaseInfo(); |
| | | _ctrlSectionBaseInfo.Name = "ctrlSectionBaseInfo"; |
| | | _ctrlSectionBaseInfo.Dock = DockStyle.Fill; |
| | | } |
| | | |
| | | |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlSectionBaseInfo); |
| | | } |
| | | if (step_id == Step_ID_Section18_Dim) |
| | | { |
| | | if (_ctrlSectionShapeInfo18 == null) |
| | | { |
| | | _ctrlSectionShapeInfo18 = new ctrlSectionShapeInfo18(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlSectionShapeInfo18); |
| | | _ctrlSectionShapeInfo18.Name = "ctrlSectionShapeInfo18"; |
| | | _ctrlSectionShapeInfo18.Dock = DockStyle.Fill; |
| | | } |
| | | |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlSectionShapeInfo18); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | if (_ctrlSetOutflowStyle == null) |
| | | _ctrlSetOutflowStyle = new ctrlSetOutflowStyle(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlSetOutflowStyle); |
| | | |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlSetOutflowStyle); |
| | | |
| | | } |
| | | if (step_id == Step_ID_Outflow_Dim) |
| | | { |
| | | if (_ctrlSetOutflowDim == null) |
| | | _ctrlSetOutflowDim = new ctrlSetOutflowDim(); |
| | | // dockPanel2.Controls.Clear(); |
| | | // dockPanel2.Controls.Add(_ctrlSetOutflowDim); |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlSetOutflowDim); |
| | | } |
| | | |
| | | |
| | |
| | | #endregion |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | #region 出水体 |
| | | |
| | | var stepGroup_出水体 = new DPumpHydr.WinFrmUI.Volute.TreeStepNode() |
| | |
| | | #endregion |
| | | |
| | | |
| | | ViewModel.HdrBaseInfo hdrBaseInfo = new ViewModel.HdrBaseInfo(); |
| | | hdrBaseInfo.Q = 200; |
| | | hdrBaseInfo.H = 50; |
| | | hdrBaseInfo.n = 2900; |
| | | hdrBaseInfo.D2 = 220; |
| | | hdrBaseInfo.B2 = 20; |
| | | |
| | | if (_ctrlHdrBaseInfo == null) |
| | | { |
| | | _ctrlHdrBaseInfo = new ctrlHdrBaseInfo(); |
| | | _ctrlHdrBaseInfo.Name = "ctrlHdrBaseInfo"; |
| | | _ctrlHdrBaseInfo.Dock = DockStyle.Right; |
| | | _ctrlHdrBaseInfo.SetBindingData(hdrBaseInfo); |
| | | } |
| | | this.panelParas.Controls.Clear(); |
| | | this.panelParas.Controls.Add(_ctrlHdrBaseInfo); |
| | | this._currentStepID = Step_ID_Hdr_Base_Info; |
| | | //this.stepTreeListCtrl.SetStepSource(_allStepNodes, 1); |
| | | } |
| | | |