| | |
| | | this.xhsProjectSimulationPropertyCtrl1.SetBindingData(() => _hydroInfo); |
| | | } |
| | | |
| | | |
| | | |
| | | #region INP导出 |
| | | |
| | | //导出水力INP文件 |
| | |
| | | { |
| | | return; |
| | | } |
| | | List<string> elementIds = null; |
| | | var elementIds = new List<string>(); |
| | | if (_parter != null) |
| | | { |
| | | if (_parter is Yw.Model.HydroLinkInfo linker) |
| | | { |
| | | elementIds = new List<string>() { linker.StartCode, linker.EndCode }; |
| | | var allParterList = _hydroInfo.GetAllParters(); |
| | | var allLinkerList = _hydroInfo.GetAllLinks(); |
| | | var startParter = allParterList?.Find(x => x.Code == linker.StartCode); |
| | | if (startParter != null) |
| | | { |
| | | if (startParter.GetType() == typeof(Yw.Model.HydroJunctionInfo)) |
| | | { |
| | | var startLinkList = allLinkerList?.Where(x => x.StartCode == startParter.Code || x.EndCode == startParter.Code).ToList(); |
| | | if (startLinkList != null) |
| | | { |
| | | elementIds.AddRange(startLinkList.Select(x => x.Code).Where(x => x != _parter.Code)); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | elementIds.Add(linker.StartCode); |
| | | } |
| | | } |
| | | var endParter = allParterList?.Find(x => x.Code == linker.EndCode); |
| | | if (endParter != null) |
| | | { |
| | | if (endParter.GetType() == typeof(Yw.Model.HydroJunctionInfo)) |
| | | { |
| | | var endLinkList = allLinkerList?.Where(x => x.StartCode == endParter.Code || x.EndCode == endParter.Code).ToList(); |
| | | if (endLinkList != null) |
| | | { |
| | | elementIds.AddRange(endLinkList.Select(x => x.Code).Where(x => x != _parter.Code)); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | elementIds.Add(linker.EndCode); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | await this.xhsProjectSimulationBimfaceCtrl1.SetLinkComponentsColor(elementIds); |
| | |
| | | var calcuParter = allCalcuParterList.Find(x => x.Id == _parter.Code); |
| | | if (calcuParter != null) |
| | | { |
| | | IHydroCalcuProperty calcuProperty = null; |
| | | IHydroCalcuResult calcuProperty = null; |
| | | if (calcuParter is Yw.EPAnet.CalcuNode calcuNode) |
| | | { |
| | | var calcuNodeProperty = new Yw.WinFrmUI.HydroCalcuNodeProperty(); |
| | | calcuNodeProperty.ID = _parter.ID; |
| | | var calcuNodeProperty = new Yw.WinFrmUI.HydroCalcuNodeResult(); |
| | | calcuNodeProperty.Code = _parter.Code; |
| | | calcuNodeProperty.CalcuPress = calcuNode.Press; |
| | | calcuNodeProperty.CalcuDemand = calcuNode.Demand; |
| | | calcuNodeProperty.CalcuHead = calcuNode.Head; |
| | |
| | | } |
| | | else if (calcuParter is Yw.EPAnet.CalcuLink calcuLink) |
| | | { |
| | | var calcuLinkProperty = new Yw.WinFrmUI.HydroCalcuLinkProperty(); |
| | | calcuLinkProperty.ID = _parter.ID; |
| | | var calcuLinkProperty = new Yw.WinFrmUI.HydroCalcuLinkResult(); |
| | | calcuLinkProperty.Code = _parter.Code; |
| | | calcuLinkProperty.CalcuHeadLoss = calcuLink.Headloss; |
| | | calcuLinkProperty.CalcuFlow = calcuLink.Flow; |
| | | calcuLinkProperty.CalcuVelocity = calcuLink.Velocity; |
| | |
| | | } |
| | | } |
| | | |
| | | #endregion 业务方法 |
| | | #endregion |
| | | |
| | | #region 配置 |
| | | |
| | |
| | | |
| | | #region 性能曲线 |
| | | |
| | | |
| | | //性能曲线 |
| | | private void barBtnFeatCurve_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) |
| | | { |
| | | if (_hydroInfo == null) |
| | |
| | | PointsQP = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQP)?.CurveData?.Select(z => new PhartRelation.PerformPoint2dViewModel() { X = z.X, Y = z.Y }).ToList(), |
| | | PointsQE = _hydroInfo.Curves?.Find(t => t.Code == x.CurveQE)?.CurveData?.Select(z => new PhartRelation.PerformPoint2dViewModel() { X = z.X, Y = z.Y }).ToList(), |
| | | }).ToList(); |
| | | var dlg = new HStation.WinFrmUI.PhartRelation.XtrPerform2dMultiViewDlg(); |
| | | var dlg = new HStation.WinFrmUI.PhartRelation.PumpPerform2dMultiViewDlg(); |
| | | dlg.SetBindingData(vmList, false, true); |
| | | dlg.ShowDialog(); |
| | | } |