文件名从 WinFrmUI/Yw.WinFrmUI.Hydro.Core/10-working/01-waterbox/SetHydroWaterboxWorkingInfoCtrl.cs 修改 |
| | |
| | | 锘縩amespace Yw.WinFrmUI |
| | | { |
| | | public partial class SetHydroWaterboxWorkingInfoCtrl : DevExpress.XtraEditors.XtraUserControl, ISetHydroParterWorkingInfoCtrl |
| | | public partial class SetHydroWaterboxWorkingInfoCtrl : DevExpress.XtraEditors.XtraUserControl, ISetHydroVisualWorkingInfoCtrl |
| | | { |
| | | public SetHydroWaterboxWorkingInfoCtrl() |
| | | { |
| | |
| | | /// <summary> |
| | | /// 鏌ョ湅缁勪欢浜嬩欢 |
| | | /// </summary> |
| | | public event Action<Yw.Model.HydroParterInfo> HydroViewEvent; |
| | | public event Action<Yw.Model.HydroVisualInfo> HydroViewEvent; |
| | | |
| | | private Yw.Model.HydroParterInfo _parter = null;//鏋勪欢 |
| | | private Yw.Model.HydroVisualInfo _visual = null;//鏋勪欢 |
| | | private HydroWaterboxWorkingInfoViewModel _workingInfo = null;//宸ュ喌淇℃伅 |
| | | |
| | | /// <summary> |
| | | /// 缁戝畾鏁版嵁 |
| | | /// </summary> |
| | | public void SetBindingData(Yw.Model.HydroParterInfo parter) |
| | | public void SetBindingData(Yw.Model.HydroVisualInfo parter) |
| | | { |
| | | var waterbox = parter as Yw.Model.HydroWaterboxInfo; |
| | | if (waterbox == null) |
| | | { |
| | | return; |
| | | } |
| | | _parter = waterbox; |
| | | _visual = waterbox; |
| | | this.layoutGroupCaption.Text = HydroParterCatalogHelper.GetName(Yw.Hydro.ParterCatalog.Waterbox); |
| | | if (!string.IsNullOrEmpty(parter.Name)) |
| | | { |
| | |
| | | /// <summary> |
| | | /// 鏇存柊缁戝畾 |
| | | /// </summary> |
| | | public void UpdateBindingData(HydroParterWorkingInfoViewModel workingInfo) |
| | | public void UpdateBindingData(HydroVisualWorkingInfoViewModel workingInfo) |
| | | { |
| | | if (_parter == null) |
| | | if (_visual == null) |
| | | { |
| | | return; |
| | | } |
| | |
| | | /// <summary> |
| | | /// 鑾峰彇宸ュ喌 |
| | | /// </summary> |
| | | public HydroParterWorkingInfoViewModel GetWorkingInfo() |
| | | public HydroVisualWorkingInfoViewModel GetWorkingInfo() |
| | | { |
| | | if (_workingInfo == null) |
| | | { |
| | |
| | | //鏌ョ湅缁勪欢 |
| | | private void layoutGroupCaption_CustomButtonClick(object sender, DevExpress.XtraBars.Docking2010.BaseButtonEventArgs e) |
| | | { |
| | | if (_parter == null) |
| | | if (_visual == null) |
| | | { |
| | | return; |
| | | } |
| | | this.HydroViewEvent?.Invoke(_parter); |
| | | this.HydroViewEvent?.Invoke(_visual); |
| | | } |
| | | |
| | | |