namespace HStation.WinFrmUI
|
{
|
public partial class SimulationSinglePumpFeatDlg : DevExpress.XtraBars.Ribbon.RibbonForm
|
{
|
public SimulationSinglePumpFeatDlg()
|
{
|
InitializeComponent();
|
this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
|
this.simulationSinglePumpFeatCtrl1.SaveEvent += SimulationSinglePumpFeatCtrl1_SaveEvent;
|
}
|
|
/// <summary>
|
/// 保存事件
|
/// </summary>
|
public event Action<HydroWorkingPumpViewModel> SaveEvent;
|
|
private void SimulationSinglePumpFeatCtrl1_SaveEvent(HydroWorkingPumpViewModel working)
|
{
|
this.SaveEvent?.Invoke(working);
|
}
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData(HydroPumpViewModel pumpViewModel, HydroCalcuResult calcuResult)
|
{
|
if (pumpViewModel == null)
|
{
|
return;
|
}
|
SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo, calcuResult);
|
}
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData
|
(
|
Yw.Model.HydroModelInfo hydroInfo,
|
Yw.Model.HydroPumpInfo pumpInfo,
|
HydroCalcuResult calcuResult
|
)
|
{
|
this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo, calcuResult);
|
}
|
|
private void SimulationPumpFeatDlg_FormClosing(object sender, FormClosingEventArgs e)
|
{
|
this.simulationSinglePumpFeatCtrl1.Save();
|
}
|
|
|
}
|
}
|