| | |
| | | { |
| | | this.HydroChangedViewEvent?.Invoke(viewList); |
| | | }; |
| | | ctrl.ParterChangedEvent += (parter, changeType) => |
| | | { |
| | | this.ParterChangedEvent?.Invoke(parter, changeType); |
| | | }; |
| | | } |
| | | } |
| | | } |
| | |
| | | public event Action<List<HydroVisualViewModel>> HydroChangedViewEvent; |
| | | |
| | | /// <summary> |
| | | /// 构件改变事件 |
| | | /// </summary> |
| | | public event Action<HydroParterInfo, eChangeType> ParterChangedEvent; |
| | | |
| | | /// <summary> |
| | | /// 列表为空时隐藏Page |
| | | /// </summary> |
| | | [Browsable(true)] |
| | |
| | | /// <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) |
| | | { |
| | |
| | | { |
| | | if (page.Controls[0] is IHydroVisualList ctrl) |
| | | { |
| | | ctrl.SetBindingData(hydroInfo, allCalcuResultVisualDict); |
| | | ctrl.SetBindingData(hydroInfo, allCalcuResultVisualDict, changeHelper, propStatusHelper); |
| | | if (HidePageWhenListIsNull) |
| | | { |
| | | if (!ctrl.HasHydroList) |
| | |
| | | /// <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) |
| | | { |
| | |
| | | { |
| | | if (page.Controls[0] is IHydroVisualList ctrl) |
| | | { |
| | | ctrl.SetBindingData(allVisualViewModelList); |
| | | ctrl.SetBindingData(allVisualViewModelList, changeHelper, propStatusHelper); |
| | | if (HidePageWhenListIsNull) |
| | | { |
| | | if (!ctrl.HasHydroList) |