| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using Yw.Model; |
| | | using Yw.Vmo; |
| | | |
| | | namespace HStation.WinFrmUI |
| | | { |
| | |
| | | { |
| | | 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(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |