From 22e1f3211a078ba498f35069c3db420dc388b164 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期二, 24 九月 2024 13:09:51 +0800
Subject: [PATCH] bimface 优化

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs
index c200425..33876a5 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs
@@ -19,6 +19,9 @@
 
         private HStation.Vmo.XhsProjectVmo _project = null;
         private HStation.Vmo.XhsProjectSiteVmo _projectSite = null;
+        private const string _linkComponentColor = "#008B00";
+        private const double _linkComponentTransparency = 0.8;
+        private List<string> _linkComponentIds = null;//杩炴帴鏋勪欢id鍒楄〃
 
         /// <summary>
         /// 缁戝畾鏁版嵁
@@ -206,5 +209,66 @@
 
         #endregion
 
+        #region 寮鸿皟鏋勪欢
+
+        /// <summary>
+        /// 璁剧疆寮鸿皟鏋勪欢
+        /// </summary>
+        public async Task SetBlinkComponents(List<string> elementIds, string color, double transparency)
+        {
+            await this.bimfaceInterop3dContainer1.SetBlinkComponents(elementIds, color, transparency);
+        }
+
+        /// <summary>
+        /// 娓呴櫎寮鸿皟鏋勪欢
+        /// </summary>
+        public async Task SetBlinkComponents()
+        {
+            await this.bimfaceInterop3dContainer1.ClearBlinkComponents();
+        }
+
+        #endregion
+
+        #region 鏋勪欢鐫�鑹�
+
+        /// <summary>
+        /// 璁剧疆寮鸿皟鏋勪欢
+        /// </summary>
+        public async Task OverrideComponentsColor(List<string> elementIds, string color, double transparency)
+        {
+            await this.bimfaceInterop3dContainer1.OverrideComponentsColor(elementIds, color, transparency);
+        }
+
+        /// <summary>
+        /// 鎭㈠鏋勪欢棰滆壊
+        /// </summary>
+        public async Task SetBlinkComponents(List<string> elementIds)
+        {
+            await this.bimfaceInterop3dContainer1.RestoreComponentsColor(elementIds);
+        }
+
+        #endregion
+
+        #region 涓氬姟
+
+        public async Task SetLinkComponentsColor(List<string> elementIds)
+        {
+            if (_linkComponentIds != null && _linkComponentIds.Count > 0)
+            {
+                await this.bimfaceInterop3dContainer1.RestoreComponentsColor(_linkComponentIds);
+            }
+            _linkComponentIds = elementIds;
+            if (elementIds == null || elementIds.Count < 1)
+            {
+                return;
+            }
+            await this.bimfaceInterop3dContainer1.OverrideComponentsColor(elementIds, _linkComponentColor, _linkComponentTransparency);
+        }
+
+
+        #endregion
+
+
+
     }
 }

--
Gitblit v1.9.3