Service/HStation.Service.Xhs.Core/00-core/Flags.cs
@@ -6,14 +6,24 @@ public class Flags { /// <summary> /// /// 默认 /// </summary> public const string 默认 = "默认"; /// <summary> /// /// 业务 /// </summary> public const string 业务 = "业务"; /// <summary> /// 进口 /// </summary> public const string 进口 = "进口"; /// <summary> /// 出口 /// </summary> public const string 出口 = "出口"; } } WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/00-core/02-visual/02-list/SimulationVisualListHelper.cs
@@ -62,6 +62,15 @@ } /// <summary> /// 获取水源列表 /// </summary> public List<HydroSourceInfo> GetSourceList() { var sources = _hydroInfo?.GetAllSources(); return sources; } /// <summary> /// 获取管段列表 /// </summary> public List<HydroLinkInfo> GetLinkList() 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) WinFrmUI/Yw.WinFrmUI.Hydro.Core/05-property/HydroVisualPropertyCtrl.cs
@@ -396,7 +396,7 @@ { vm.Vmo.Flags = flags; vm.Flags = Yw.Untity.FlagsHelper.ToString(flags); UpdateRows(); this.propertyGridControl1.RefreshEditor(); this.PropertyValueChangedEvent?.Invoke(vm); }; dlg.ShowDialog();