Shuxia Ning
2025-01-15 facdda630bc2a16c2a61e5db6e4387e257202d44
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportDlg.cs
@@ -1,13 +1,5 @@
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.Model;
using Yw.Vmo;
namespace HStation.WinFrmUI
{
@@ -17,6 +9,33 @@
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.generalOkAndCancelCtrl1.OkEvent += GeneralOkAndCancelCtrl1_OkEvent;
        }
        public event Action<HStation.ReportFile.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();
        }
    }
}