From 0cc49afcb0da13470d36a4412767d38588682f62 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 29 十一月 2024 09:31:19 +0800 Subject: [PATCH] 新增水力属性视图控件 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs | 59 ++++++++++++++++++++++------------------------------------- 1 files changed, 22 insertions(+), 37 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 a42dee2..6034bf7 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 @@ -167,10 +167,10 @@ #region 灞炴�ф帶浠� //灞炴�ф帶浠� - private XhsProjectSimulationPropertyCtrl _propertyCtrl = null; + private HydroVisualPropertyViewCtrl _propertyCtrl = null; //鑾峰彇灞炴�ф帶浠� - private XhsProjectSimulationPropertyCtrl GetPropertyCtrl() + private HydroVisualPropertyViewCtrl GetPropertyCtrl() { if (_hydroInfo == null) { @@ -178,11 +178,11 @@ } if (_propertyCtrl == null) { - _propertyCtrl = new XhsProjectSimulationPropertyCtrl(); + _propertyCtrl = new HydroVisualPropertyViewCtrl(); _propertyCtrl.Dock = DockStyle.Fill; - _propertyCtrl.HydroViewEvent += (visual) => + _propertyCtrl.HydroViewEvent += (visualViewModel) => { - SelectVisual(visual, eVisualSource.Property); + SelectVisual(GetVisual(visualViewModel), eVisualSource.Property); }; _propertyCtrl.BlinkLinkNodeEvent += async (link, linkNodeCode) => { //寮鸿皟杩炴帴鑺傜偣 @@ -221,38 +221,6 @@ await Task.Delay(5000); await _bimfaceCtrl?.ClearBlinkComponents(); }; - _propertyCtrl.PropertyValueChangedEvent += async (visual) => - { - if (visual == null) - { - return; - } - UpdateVisualListCtrl(); - var gradingHelper = await GetGradingHelper(); - gradingHelper.Set(); - }; - _propertyCtrl.MarkPropertyValueChangedEvent += async (visual) => - { - //鏍囨敞灞炴�у彂鐢熸敼鍙� - //鍒ゆ柇褰撳墠鏄惁鏈夋爣娉ㄥ睍绀猴紝鑻ユ湁鍒欐洿鏂版爣娉紝鏈�濂芥槸鏇存柊鍗曚釜鏍囨敞 - var markHelper = await GetMarkHelper(); - markHelper.Set(visual); - }; - _propertyCtrl.GradingPropertyValueChangedEvent += async (visual) => - { - //鍒嗙骇灞炴�у彂鐢熸敼鍙� - //鍒ゆ柇褰撳墠鏄惁鏈夊垎绾у睍绀猴紝鑻ユ湁鍒欐洿鏂板垎绾э紝鏈�濂芥槸鏇存柊鍗曚釜鍒嗙骇 - var gradingHelper = await GetGradingHelper(); - gradingHelper.Set(visual); - }; - _propertyCtrl.FlowEffectPropertyValueChangedEvent += async (visual) => - { - //娴佸悜灞炴�у彂鐢熸敼鍙� - //鍒ゆ柇娴佸悜鏄惁鍔犺浇锛屽鏋滃姞杞藉垯鏇存柊娴佸悜锛屾渶濂芥槸鏇存柊鍗曚釜娴佸悜 - var flowEffectHelper = await GetFlowEffectHelper(); - flowEffectHelper.Set(visual); - }; - } return _propertyCtrl; } @@ -425,6 +393,23 @@ return _visualListHelper; } + //鑾峰彇鍙鏋勪欢 + private Yw.Model.HydroVisualInfo GetVisual(string code) + { + if (string.IsNullOrEmpty(code)) + { + return default; + } + var visualListHelper = GetVisualListHelper(); + return visualListHelper.GetVisual(code); + } + + //鑾峰彇鍙鏋勪欢 + private Yw.Model.HydroVisualInfo GetVisual(HydroVisualViewModel visualViewModel) + { + return GetVisual(visualViewModel?.Code); + } + #endregion #region 瑙嗗浘鍒楄〃 -- Gitblit v1.9.3