From 7d17fabc46e87ea0f0896f760034f4d16a4dfed0 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 20 九月 2024 13:20:57 +0800 Subject: [PATCH] 提交修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs | 71 +++++++++++++++++++++++++++++++---- 1 files changed, 62 insertions(+), 9 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs index eb25cc4..c56496b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/XhsProjectSimulationCorePage.cs @@ -12,7 +12,6 @@ InitializeComponent(); this.PageTitle.Caption = "姘村姏妯℃嫙"; this.PageTitle.HeaderSvgImage = this.svgImg32[0]; - this.docPnlBottom.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; } @@ -20,7 +19,7 @@ private HStation.Vmo.XhsProjectVmo _project = null;//椤圭洰 private HStation.Vmo.XhsProjectSiteVmo _projectSite = null;//椤圭洰绔� private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅 - private List<string> _showHideCodeList = null;//鏄鹃殣缂栫爜鍒楄〃 + private List<string> _fastShowHideCodeList = null;//鏄鹃殣缂栫爜鍒楄〃 private Yw.Model.HydroParterInfo _parter = null; private Yw.EPAnet.CheckResult _checkResult = null; @@ -54,6 +53,7 @@ _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID); } this.xhsProjectSimulationPropertyCtrl1.SetBindingData(_hydroInfo); + this.xhsProjectSimulationQ3dCtrl1.SetBindingData(_hydroInfo); } /// <summary> @@ -73,14 +73,25 @@ #region 妯″瀷 //涓�閿樉闅� - private void barBtnShowHide_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) + private async void barBtnShowHide_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (_hydroInfo == null) { return; } - if (_showHideCodeList == null) + if (_hydroInfo.Decorators == null || _hydroInfo.Decorators.Count < 1) { + return; + } + if (_fastShowHideCodeList == null) + { + _fastShowHideCodeList = _hydroInfo.Waterboxs.Select(x => x.Code).ToList(); + await this.xhsProjectSimulationBimfaceCtrl1.HideComponents(_fastShowHideCodeList); + } + else + { + await this.xhsProjectSimulationBimfaceCtrl1.ShowComponents(_fastShowHideCodeList); + _fastShowHideCodeList = null; } } @@ -103,6 +114,7 @@ return; } this.xhsProjectSimulationHydroCheckFailedCtrl1.SetBindingData(_checkResult.FailedList); + this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; } @@ -121,9 +133,9 @@ TipFormHelper.ShowSucceed("璁$畻鎴愬姛锛�"); return; } - var dlg = new XhsProjectSimulationHydroCalcuFailedDlg(); - dlg.SetBindingData(_calcuResult.FailedList); - dlg.ShowDialog(); + this.xhsProjectSimulationHydroCalcuFailedCtrl1.SetBindingData(_calcuResult.FailedList); + this.docPnlHydroCheck.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Hidden; + this.docPnlHydroCalcu.Visibility = DevExpress.XtraBars.Docking.DockVisibility.Visible; } //姘村姏鏋勪欢鍒楄〃 @@ -249,7 +261,49 @@ //鑷姩鍖归厤 private void barBtnAllAutoMatching_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { - var dlg = new AssetsAutoMatchingMainDlg(); + // _hydroInfo + var pump = _hydroInfo.Pumps; + var threelinks = _hydroInfo.Threelinks; + var aa = new AssetsAutoMatchingInputViewModel(); + foreach (var item in pump) + { + aa = new AssetsAutoMatchingInputViewModel + { + PumpMatchingModels = new List<PumpMatchingViewModel> + { + new PumpMatchingViewModel + { + RatedH = item.RatedH, // 鍋囪item宸茬粡瀹氫箟骞朵笖鍖呭惈浜哛atedH绛夊睘鎬� + RatedP = item.RatedP, + RatedQ = item.RatedQ, + RatedN = item.RatedN, + ModelType=item.ModelType, + DbID=item.DbId, + DbLocked=item.DbLocked + } + } + }; + } + foreach (var item in threelinks) + { + aa = new AssetsAutoMatchingInputViewModel + { + ThreeLinkMatchingModels = new List<ThreeLinkMatchingViewModel> + { + new ThreeLinkMatchingViewModel + { + Caliber=item.Caliber, + Material=item.Material, + ModelType=item.ModelType, + DbLocked=item.DbLocked, + ID=item.ID, + Code=item.Code, + MinorLoss=item.MinorLoss + } + } + }; + } + var dlg = new AssetsAutoMatchingMainDlg(aa); dlg.ShowDialog(); } @@ -273,6 +327,5 @@ _parter = allParterList.Find(x => x.Code == obj); ShowProperty(); } - } } \ No newline at end of file -- Gitblit v1.9.3