From 549b9ad0a143b6fbd86ce02ddfa470b5556126e7 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 23 十月 2024 22:12:38 +0800 Subject: [PATCH] 水力计算前提条件 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs | 64 +++++++------------------------ 1 files changed, 15 insertions(+), 49 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs index e689503..d0fbe62 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs @@ -334,28 +334,31 @@ #region 寮鸿皟鏋勪欢 + private const string _blinkColor = "#32D3A6";//寮鸿皟鏋勪欢棰滆壊 + private const double _blinkTransparency = 0.8d; //寮鸿皟鏋勪欢閫忔槑搴� + /// <summary> /// 璁剧疆寮鸿皟鏋勪欢 /// </summary> public async Task SetBlinkComponents(List<string> elementIds, string color, double transparency) { - if (_bimfaceInteropContainer == null) - { - return; - } - await _bimfaceInteropContainer.SetBlinkComponents(elementIds, color, transparency); + await _bimfaceInteropContainer?.SetBlinkComponents(elementIds, color, transparency); + } + + /// <summary> + /// 璁剧疆寮鸿皟鏋勪欢 + /// </summary> + public async Task SetBlinkComponents(List<string> elementIds) + { + await _bimfaceInteropContainer?.SetBlinkComponents(elementIds, _blinkColor, _blinkTransparency); } /// <summary> /// 娓呴櫎寮鸿皟鏋勪欢 /// </summary> - public async Task SetBlinkComponents() + public async Task ClearBlinkComponents() { - if (_bimfaceInteropContainer == null) - { - return; - } - await _bimfaceInteropContainer.ClearBlinkComponents(); + await _bimfaceInteropContainer?.ClearBlinkComponents(); } #endregion @@ -377,7 +380,7 @@ /// <summary> /// 鎭㈠鏋勪欢棰滆壊 /// </summary> - public async Task SetBlinkComponents(List<string> elementIds) + public async Task RestoreComponentsColor(List<string> elementIds) { if (_bimfaceInteropContainer == null) { @@ -477,9 +480,6 @@ #endregion - #region 涓氬姟 - - #region 杩炴帴鏋勪欢棰滆壊 private const string _linkComponentColor = "#008B00";//杩炴帴鏋勪欢棰滆壊 @@ -547,40 +547,6 @@ _linkComponentIds.AddRange(elementIds); await _bimfaceInteropContainer?.OverrideComponentsColor(elementIds, _linkEndComponentColor, _linkComponentTransparency); } - - #endregion - - #region 璁剧疆Open鏋勪欢棰滆壊 - - private const string _openComponentColor = "#2E8B57"; - private const double _openComponentTransparency = 0.8; - private List<string> _openComponentIds = null;//Open鏋勪欢id鍒楄〃 - - /// <summary> - /// 璁剧疆Open鏋勪欢棰滆壊 - /// </summary> - public async Task SetOpenComponentsColor(List<string> elementIds) - { - if (_openComponentIds != null && _openComponentIds.Count > 0) - { - await _bimfaceInteropContainer.RestoreComponentsColor(_openComponentIds); - } - _openComponentIds = elementIds; - if (elementIds == null || elementIds.Count < 1) - { - return; - } - if (_bimfaceInteropContainer == null) - { - return; - } - await _bimfaceInteropContainer.OverrideComponentsColor(elementIds, _openComponentColor, _openComponentTransparency); - } - - #endregion - - - #endregion -- Gitblit v1.9.3