From c4408f6dbef369110f17808808ae45e48726f3f1 Mon Sep 17 00:00:00 2001 From: Shuxia Ning <NingShuxia0927@outlook.com> Date: 星期一, 14 十月 2024 14:27:45 +0800 Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 75 +++++++++++++++++++++++++++++++++++++ 1 files changed, 74 insertions(+), 1 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 454f765..4f71974 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,4 +1,6 @@ 锘縢lobal using Yw.EPAnet; +using Yw.WinFrmUI.Bimface; +using Yw.WinFrmUI.Hydro; namespace HStation.WinFrmUI { @@ -599,7 +601,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 +782,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