| | |
| | | namespace HStation.WinFrmUI |
| | | using DevExpress.Office.Utils; |
| | | using DevExpress.Xpo.Helpers; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class XhsProjectSimulationBimfaceCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | |
| | | |
| | | 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> |
| | | /// 绑定数据 |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region 缩放 |
| | | |
| | | /// <summary> |
| | | /// 缩放至构件 |
| | | /// </summary> |
| | | public async Task ZoomToComponent(string elementId) |
| | | { |
| | | await this.bimfaceInterop3dContainer1.ZoomToComponent(elementId); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 缩放至选择构件 |
| | | /// </summary> |
| | | public async Task ZoomToSelectedComponents() |
| | | { |
| | | await this.bimfaceInterop3dContainer1.ZoomToSelectedComponents(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 缩放至选择构件 |
| | | /// </summary> |
| | | public async Task ZoomAndSelectComponents(List<string> elementIds) |
| | | { |
| | | await this.bimfaceInterop3dContainer1.ZoomAndSelectComponents(elementIds); |
| | | } |
| | | |
| | | #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 |
| | | |
| | | |
| | | |
| | | } |
| | | } |