| | |
| | | { |
| | | return; |
| | | } |
| | | _checkResult = _hydroInfo.Check(); |
| | | if (!_checkResult.Succeed) |
| | | { |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | var checkResultCtrl = GetCheckResultCtrl(); |
| | | checkResultCtrl.SetBindingData(_checkResult); |
| | | this.controlContainerBottom.Controls.Add(checkResultCtrl); |
| | | TipFormHelper.ShowWarn("校验失败,请检查后重试"); |
| | | return; |
| | | } |
| | | |
| | | var netWork = Yw.Hydro.ParseHelper.ToNetwork(_hydroInfo); |
| | | _calcuResult = netWork.Calcu(); |
| | | if (_calcuResult.Succeed) |
| | | { |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; |
| | | this.controlContainerBottom.Controls.Clear(); |
| | | var parterListCtrl = GetParterListCtrl(); |
| | | var calcuResultList = new List<IHydroCalcuResult>(); |
| | | _calcuResult.NodeList?.ForEach(x => |
| | | { |
| | | calcuResultList.Add(new HydroCalcuNodeResult() |
| | | { |
| | | Code = x.Id, |
| | | CalcuPress = x.Press, |
| | | CalcuHead = x.Head, |
| | | CalcuDemand = x.Demand, |
| | | }); |
| | | }); |
| | | _calcuResult.LinkList?.ForEach(x => |
| | | { |
| | | calcuResultList.Add(new HydroCalcuLinkResult() |
| | | { |
| | | Code = x.Id, |
| | | CalcuFlow = x.Flow, |
| | | CalcuVelocity = x.Velocity, |
| | | CalcuHeadLoss = x.Headloss |
| | | }); |
| | | }); |
| | | parterListCtrl.SetBindingData(_hydroInfo, calcuResultList); |
| | | parterListCtrl.SetCalcuView(); |
| | | this.controlContainerBottom.Controls.Add(parterListCtrl); |
| | | this.docPnlBottom.Text = "计算结果"; |
| | | ShowProperty(); |
| | | TipFormHelper.ShowSucceed("计算成功!"); |
| | | await this.xhsProjectSimulationBimfaceCtrl1.ShowCalcuCustomLabels(_calcuResult); |
| | | TipFormHelper.ShowSucceed("计算成功!"); |
| | | } |
| | | else |
| | | { |
| | | _calcuCtrl.SetBindingData(_calcuResult.FailedList); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlBottom.Text = "水力计算失败原因"; |
| | | this.docPnlBottom.Text = "计算失败原因"; |
| | | this.docPnlBottom.Height = 350; |
| | | TipFormHelper.ShowError("计算失败"); |
| | | } |
| | | |
| | | }; |
| | |
| | | calcuCtrl.SetBindingData(_hydroInfo); |
| | | this.controlContainerBottom.Controls.Add(calcuCtrl); |
| | | this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; |
| | | this.docPnlBottom.Text = "水力计算前提条件"; |
| | | this.docPnlBottom.Text = "计算前提条件"; |
| | | this.docPnlBottom.Height = 350; |
| | | } |
| | | |