lixiaojun
2025-01-07 db26311246d1c1cecadf4a22dc44ffa570ee40f2
WinFrmUI/Yw.WinFrmUI.Hydro.Core/06-visual/00-core/HydroVisualListCtrl.cs
@@ -27,10 +27,6 @@
                    {
                        this.HydroChangedViewEvent?.Invoke(viewList);
                    };
                    ctrl.ParterChangedEvent += (parter, changeType) =>
                    {
                        this.ParterChangedEvent?.Invoke(parter, changeType);
                    };
                }
            }
        }
@@ -53,11 +49,6 @@
        public event Action<List<HydroVisualViewModel>> HydroChangedViewEvent;
        /// <summary>
        /// 构件改变事件
        /// </summary>
        public event Action<HydroParterInfo, eChangeType> ParterChangedEvent;
        /// <summary>
        /// 列表为空时隐藏Page
        /// </summary>
        [Browsable(true)]
@@ -73,24 +64,41 @@
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo)
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            this.SetBindingData(hydroInfo, allCalcuResultVisualDict: null);
            this.SetBindingData(hydroInfo, allCalcuResultVisualDict: null, changeHelper, propStatusHelper);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, List<HydroCalcuVisualResult> allCalcuResultList)
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                List<HydroCalcuVisualResult> allCalcuResultList,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            var allCalcuResultVisualDict = allCalcuResultList?.ToDictionary(x => x.Code);
            SetBindingData(hydroInfo, allCalcuResultVisualDict);
            SetBindingData(hydroInfo, allCalcuResultVisualDict, changeHelper, propStatusHelper);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Dictionary<string, HydroCalcuVisualResult> allCalcuResultVisualDict)
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Dictionary<string, HydroCalcuVisualResult> allCalcuResultVisualDict,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (hydroInfo == null)
            {
@@ -100,7 +108,7 @@
            {
                if (page.Controls[0] is IHydroVisualList ctrl)
                {
                    ctrl.SetBindingData(hydroInfo, allCalcuResultVisualDict);
                    ctrl.SetBindingData(hydroInfo, allCalcuResultVisualDict, changeHelper, propStatusHelper);
                    if (HidePageWhenListIsNull)
                    {
                        if (!ctrl.HasHydroList)
@@ -115,7 +123,12 @@
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(List<HydroVisualViewModel> allVisualViewModelList)
        public void SetBindingData
            (
                List<HydroVisualViewModel> allVisualViewModelList,
                HydroChangeHelper changeHelper = null,
                HydroPropStatusHelper propStatusHelper = null
            )
        {
            if (allVisualViewModelList == null || allVisualViewModelList.Count < 1)
            {
@@ -125,7 +138,7 @@
            {
                if (page.Controls[0] is IHydroVisualList ctrl)
                {
                    ctrl.SetBindingData(allVisualViewModelList);
                    ctrl.SetBindingData(allVisualViewModelList, changeHelper, propStatusHelper);
                    if (HidePageWhenListIsNull)
                    {
                        if (!ctrl.HasHydroList)