using DevExpress.XtraEditors;
|
using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using System.Windows.Forms;
|
using Yw.DiagramFile;
|
using Yw.Model;
|
using Yw.Vmo;
|
|
namespace HStation.WinFrmUI
|
{
|
public partial class SimulationWorkingReportDlg : DevExpress.XtraEditors.XtraForm
|
{
|
public SimulationWorkingReportDlg()
|
{
|
InitializeComponent();
|
this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
|
this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
|
}
|
|
public event Action<SimulationWorkingReportViewModel> ReloadDataEvent;
|
|
/// <summary>
|
/// 绑定数据
|
/// </summary>
|
public void SetBindingData
|
(
|
XhsProjectVmo project,
|
Yw.Model.HydroModelInfo hydroInfo,
|
List<HydroMonitorVmo> allMonitorList,
|
HydroWorkingVmo working,
|
HydroCalcuResult calcuResult,
|
HydroVisualInfo visual
|
)
|
{
|
this.simulationWorkingReportCtrl1.SetBindingData(project, hydroInfo, allMonitorList, working, calcuResult, visual);
|
}
|
|
private async void GeneralOkAndCancelCtrl1_OkEvent()
|
{
|
var vm = await this.simulationWorkingReportCtrl1.GetViewModel();
|
this.ReloadDataEvent?.Invoke(vm);
|
this.DialogResult = DialogResult.OK;
|
this.Close();
|
}
|
}
|
}
|