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;
}
///
/// 保存事件
///
public event Action SaveEvent;
private void SimulationSinglePumpFeatCtrl1_SaveEvent(HydroWorkingPumpViewModel working)
{
this.SaveEvent?.Invoke(working);
}
///
/// 绑定数据
///
public void SetBindingData(HydroPumpViewModel pumpViewModel)
{
if (pumpViewModel == null)
{
return;
}
SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo);
}
///
/// 绑定数据
///
public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo, Yw.Model.HydroPumpInfo pumpInfo)
{
this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo);
}
private void SimulationPumpFeatDlg_FormClosing(object sender, FormClosingEventArgs e)
{
this.simulationSinglePumpFeatCtrl1.Save();
}
}
}