lixiaojun
2024-12-23 c2b56fc9401718620dd2a280557b8c716e4ad05a
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/08-working/XhsProjectSimulationWorkingPage.cs
@@ -587,10 +587,30 @@
        #region 一键显隐
        private List<string> _allDecoratorCodes = null;
        //获取装饰件code列表
        private async Task<List<string>> GetDecoratorCodes()
        {
            if (_hydroInfo == null)
            {
                return default;
            }
            if (_allDecoratorCodes != null)
            {
                return default;
            }
            _allDecoratorCodes = await BLLFactory<Yw.BLL.HydroDecoratorInfo>.Instance.GetCodeListByModelID(_hydroInfo.ID, null);
            if (_allDecoratorCodes == null)
            {
                _allDecoratorCodes = new List<string>();
            }
            return _allDecoratorCodes;
        }
        //设置装饰件可见性
        private async void SetDecoratorVisible(bool isDecoratorVisible)
        {
            var codes = _hydroInfo.Decorators?.Select(x => x.Code).Distinct().ToList();
            var codes = await GetDecoratorCodes();
            if (isDecoratorVisible)
            {
                await _bimfaceCtrl?.ShowComponents(codes);