Shuxia Ning
2024-11-19 6d4be4121ae5995577bb21abe88b79777c64be62
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/02-bimface/XhsProjectSimulationBimfaceCtrl.cs
@@ -1,5 +1,4 @@
using DevExpress.Xpo.Helpers;
using Yw.WinFrmUI.Bimface;
using Yw.WinFrmUI.Bimface;
namespace HStation.WinFrmUI
{
@@ -13,11 +12,11 @@
        /// <summary>
        /// 水力点击事件(包含左键和右键)
        /// </summary>
        public event Action<Yw.Model.HydroParterInfo> HydroClickEvent;
        public event Action<Yw.Model.HydroVisualInfo> HydroClickEvent;
        /// <summary>
        /// 水力点击事件(仅左键)
        /// </summary>
        public event Action<Yw.Model.HydroParterInfo> HydroMouseLeftClickEvent;
        public event Action<Yw.Model.HydroVisualInfo> HydroMouseLeftClickEvent;
        /// <summary>
        /// 加载完成事件
        /// </summary>
@@ -90,7 +89,7 @@
                        {
                            return;
                        }
                        var allParterList = hydroInfo.GetAllParters();
                        var allParterList = hydroInfo.GetAllVisuals();
                        var parter = allParterList?.Find(x => x.Code == obj.ObjectId);
                        this.HydroClickEvent.Invoke(parter);
                    }
@@ -112,7 +111,7 @@
                        {
                            return;
                        }
                        var allParterList = hydroInfo.GetAllParters();
                        var allParterList = hydroInfo.GetAllVisuals();
                        var parter = allParterList?.Find(x => x.Code == obj.ObjectId);
                        this.HydroMouseLeftClickEvent.Invoke(parter);
                    }
@@ -373,11 +372,19 @@
        /// </summary>
        public async Task OverrideComponentsColor(List<string> elementIds, string color, double transparency)
        {
            if (_bimfaceInteropContainer == null)
            await _bimfaceInteropContainer?.OverrideComponentsColor(elementIds, color, transparency);
        }
        /// <summary>
        /// 设置强调构件
        /// </summary>
        public async Task OverrideComponentsColor(string elementId, string color, double transparency)
        {
            if (string.IsNullOrEmpty(elementId))
            {
                return;
            }
            await _bimfaceInteropContainer.OverrideComponentsColor(elementIds, color, transparency);
            await _bimfaceInteropContainer.OverrideComponentsColor(new List<string>() { elementId }, color, transparency);
        }
        /// <summary>
@@ -385,11 +392,19 @@
        /// </summary>
        public async Task RestoreComponentsColor(List<string> elementIds)
        {
            if (_bimfaceInteropContainer == null)
            await _bimfaceInteropContainer?.RestoreComponentsColor(elementIds);
        }
        /// <summary>
        /// 恢复构件颜色
        /// </summary>
        public async Task RestoreComponentsColor(string elementId)
        {
            if (string.IsNullOrEmpty(elementId))
            {
                return;
            }
            await _bimfaceInteropContainer.RestoreComponentsColor(elementIds);
            await _bimfaceInteropContainer?.RestoreComponentsColor(new List<string>() { elementId });
        }
        #endregion
@@ -476,6 +491,22 @@
        }
        /// <summary>
        /// 更新业务标注引线标签
        /// </summary>
        public async Task UpdateLogicMarkLeadLabel(LogicMarkLeadLabel obj)
        {
            await _bimfaceInteropContainer?.UpdateLogicMarkLeadLabel(obj);
        }
        /// <summary>
        /// 更新业务标注引线标签
        /// </summary>
        public async Task UpdateLogicMarkLeadLabels(List<LogicMarkLeadLabel> obj)
        {
            await _bimfaceInteropContainer?.UpdateLogicMarkLeadLabels(obj);
        }
        /// <summary>
        /// 清除业务标注引线标签
        /// </summary>
        public async Task ClearLogicMarkLeadLabels()
@@ -501,6 +532,22 @@
        public async Task LoadFlowEffect(List<LogicFlowEffect> obj)
        {
            await _bimfaceInteropContainer?.LoadFlowEffectList(obj);
        }
        /// <summary>
        /// 更新水流动画
        /// </summary>
        public async Task UpdateFlowEffect(LogicFlowEffect obj)
        {
            await _bimfaceInteropContainer?.UpdateFlowEffect(obj);
        }
        /// <summary>
        /// 更新水流动画
        /// </summary>
        public async Task UpdateFlowEffectList(List<LogicFlowEffect> obj)
        {
            await _bimfaceInteropContainer?.UpdateFlowEffectList(obj);
        }
        /// <summary>
@@ -591,7 +638,25 @@
        #endregion
        #region 业务监测点
        /// <summary>
        /// 设置业务监测点
        /// </summary>
        public async Task SetLogicMonitors(List<LogicMonitor> obj)
        {
            await _bimfaceInteropContainer?.SetLogicMonitors(obj);
        }
        /// <summary>
        /// 清除业务监测点
        /// </summary>
        public async Task ClearLogicMonitors()
        {
            await _bimfaceInteropContainer?.ClearLogicMonitors();
        }
        #endregion
    }
}