From c7e02f7991407f48a377b47ad2599f52017e8d55 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期一, 14 十月 2024 16:01:59 +0800 Subject: [PATCH] 曲线 ok --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 84 +++++++++++++++++++++++++++++++++++++++--- 1 files changed, 78 insertions(+), 6 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs index f36e230..d58715b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -1,7 +1,6 @@ 锘縢lobal using Yw.EPAnet; -using DevExpress.XtraMap.Drawing; -using NetTaste; -using Org.BouncyCastle.Crypto.Engines; +using Yw.WinFrmUI.Bimface; +using Yw.WinFrmUI.Hydro; namespace HStation.WinFrmUI { @@ -12,8 +11,7 @@ InitializeComponent(); this.PageTitle.Caption = "姘村姏妯℃嫙"; this.PageTitle.HeaderSvgImage = this.svgImg32[0]; - this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; - + this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; } private HStation.Vmo.XhsProjectVmo _project = null;//椤圭洰 @@ -499,11 +497,13 @@ { return; } + if (_parter == null) { this.xhsProjectSimulationPropertyCtrl1.SelectParter(null); return; } + this.xhsProjectSimulationPropertyCtrl1.SelectParter(_parter.Code); if (_calcuResult != null) { @@ -540,6 +540,7 @@ } } } + } #endregion @@ -599,7 +600,7 @@ var qh_pt_list = qh.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); var qe_pt_list = qe?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); var qp_pt_list = qp?.Select(x => new Yw.Geometry.Point2d(x.X, x.Y)).ToList(); - + var vm = new Yw.WinFrmUI.Phart.PumpSerialParallelViewModel(); vm.Id = x.Code; vm.Name = x.Code; @@ -780,5 +781,76 @@ + #region 鏍囨敞 + + private List<HydroMarkSetViewModel> _allMarkList = null; + + //鏍囨敞 + private void barBtnMark_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + { + if (_hydroInfo == null) + { + return; + } + if (_allMarkList == null) + { + _allMarkList = new List<HydroMarkSetViewModel>(); + if (_hydroInfo.Waterboxs != null && _hydroInfo.Waterboxs.Count > 0) + { + _allMarkList.Add(new HydroMarkSetViewModel() + { + Code = Yw.Hydro.ParterCatalog.Waterbox, + Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Waterbox), + MarkType = (int)eWaterboxMarkType.None + }); + } + if (_hydroInfo.Pumps != null && _hydroInfo.Pumps.Count > 0) + { + _allMarkList.Add(new HydroMarkSetViewModel() + { + Code = Yw.Hydro.ParterCatalog.Pump, + Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Pump), + MarkType = (int)eWaterboxMarkType.None + }); + } + if (_hydroInfo.Valves != null && _hydroInfo.Valves.Count > 0) + { + _allMarkList.Add(new HydroMarkSetViewModel() + { + Code = Yw.Hydro.ParterCatalog.Valve, + Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Valve), + MarkType = (int)eWaterboxMarkType.None + }); + } + if (_hydroInfo.Pipes != null && _hydroInfo.Pipes.Count > 0) + { + _allMarkList.Add(new HydroMarkSetViewModel() + { + Code = Yw.Hydro.ParterCatalog.Pipe, + Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Pipe), + MarkType = (int)eWaterboxMarkType.None + }); + } + if (_hydroInfo.Nozzles != null && _hydroInfo.Nozzles.Count > 0) + { + _allMarkList.Add(new HydroMarkSetViewModel() + { + Code = Yw.Hydro.ParterCatalog.Nozzle, + Name = Yw.WinFrmUI.HydroParterCatalogHelper.GetCatalogName(Yw.Hydro.ParterCatalog.Nozzle), + MarkType = (int)eWaterboxMarkType.None + }); + } + } + var dlg = new SetHydroMarkDlg(); + dlg.SetBindingData(() => _hydroInfo, _allMarkList); + dlg.ReloadDataEvent += async (obj) => + { + var leadLabels = obj?.Select(x => new LeadLabel() { Id = x.Code, Text = x.Text }).ToList(); + await _bimfaceCtrl?.SetLeadLabels(leadLabels); + }; + dlg.ShowDialog(); + } + + #endregion } } \ No newline at end of file -- Gitblit v1.9.3