From 4170a9b6560da29f21e6512358a4307b267ddfa8 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期一, 09 十二月 2024 16:40:01 +0800 Subject: [PATCH] 标签修正 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs | 47 ++++++++++++++--------------------------------- 1 files changed, 14 insertions(+), 33 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs index a8b09e0..c20af2b 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs @@ -45,25 +45,6 @@ ( XhsProjectVmo project, XhsProjectSiteVmo projectSite, - Yw.Model.HydroModelInfo hydroInfo, - HydroWorkingVmo working - ) - { - _project = project; - _projectSite = projectSite; - _hydroInfo = hydroInfo.Adapt<Yw.Model.HydroModelInfo>(); - _working = working; - _hydroInfo.UpdateWorkingInfo(_working.WorkingInfo); - this.PageTitle.Caption = $"姘村姏妯℃嫙\r\n{_working.Name}"; - } - - /// <summary> - /// 缁戝畾鏁版嵁 - /// </summary> - public void SetBindingData - ( - XhsProjectVmo project, - XhsProjectSiteVmo projectSite, XhsSchemeVmo scheme, Yw.Model.HydroModelInfo hydroInfo, HydroWorkingVmo working @@ -75,7 +56,14 @@ _hydroInfo = hydroInfo.Adapt<Yw.Model.HydroModelInfo>(); _working = working; _hydroInfo.UpdateWorkingInfo(_working.WorkingInfo); - this.PageTitle.Caption = $"{scheme.Name}\r\n{_working.Name}"; + if (_scheme == null) + { + this.PageTitle.Caption = $"姘村姏妯℃嫙\r\n{_working.Name}"; + } + else + { + this.PageTitle.Caption = $"{scheme.Name}\r\n{_working.Name}"; + } } /// <summary> @@ -179,10 +167,10 @@ #region 灞炴�ф帶浠� //灞炴�ф帶浠� - private HydroVisualPropertyViewCtrl _propertyCtrl = null; + private SimulationPropertyCtrl _propertyCtrl = null; //鑾峰彇灞炴�ф帶浠� - private HydroVisualPropertyViewCtrl GetPropertyCtrl() + private SimulationPropertyCtrl GetPropertyCtrl() { if (_hydroInfo == null) { @@ -190,11 +178,12 @@ } if (_propertyCtrl == null) { - _propertyCtrl = new HydroVisualPropertyViewCtrl(); + _propertyCtrl = new SimulationPropertyCtrl(); _propertyCtrl.Dock = DockStyle.Fill; - _propertyCtrl.HydroViewEvent += (visualViewModel) => + _propertyCtrl.AllowEdit = false; + _propertyCtrl.HydroViewEvent += (visual) => { - SelectVisual(GetVisual(visualViewModel), eVisualSource.Property); + SelectVisual(visual, eVisualSource.Property); }; _propertyCtrl.BlinkLinkNodeEvent += async (link, linkNodeCode) => { //寮鸿皟杩炴帴鑺傜偣 @@ -286,14 +275,6 @@ _propertyCtrl?.UpdateRows(); } - //娓呯悊灞炴�ф帶浠� - private void ClearPropertyCtrl() - { - if (_propertyCtrl != null) - { - _propertyCtrl.SelectedObject = null; - } - } #endregion -- Gitblit v1.9.3