Shuxia Ning
2024-12-09 f97b3ccbfd63b62ec875223fcc417633f6ce2989
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/06-simulation/XhsProjectSimulationCorePage.cs
@@ -419,6 +419,20 @@
            return _visualListHelper;
        }
        //获取可见列表
        private List<Yw.Model.HydroVisualInfo> GetVisualList()
        {
            var helper = GetVisualListHelper();
            return helper.GetVisualList();
        }
        //获取水源列表
        private List<Yw.Model.HydroSourceInfo> GetSourceList()
        {
            var helper = GetVisualListHelper();
            return helper.GetSourceList();
        }
        #endregion
        #region 视图列表
@@ -2368,8 +2382,27 @@
        {
            if (_visual == null)
            {
                TipFormHelper.ShowWarn("请选择构件后重试!");
                return;
                var sources = GetSourceList();
                if (sources != null)
                {
                    if (sources.Count == 1)
                    {
                        SelectVisual(sources[0], eVisualSource.None);
                    }
                    else
                    {
                        var source = sources.FirstOrDefault(x => x.Flags.Contains(HStation.Xhs.Flags.进口));
                        if (source != null)
                        {
                            SelectVisual(source, eVisualSource.None);
                        }
                    }
                }
                if (_visual == null)
                {
                    TipFormHelper.ShowWarn("请选择构件后重试!");
                    return;
                }
            }
            HydroVisualInfo visual = _visual;
            if (_visual is HydroLinkInfo linkInfo)