lixiaojun
2024-12-17 39b6a686ab59135e63a44ab206fd8ca361878f91
WinFrmUI/HStation.WinFrmUI.Xhs.Core/03-simulation/12-report/02-helper/SimulationWorkingReportDlg.cs
@@ -8,6 +8,8 @@
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Yw.Model;
using Yw.Vmo;
namespace HStation.WinFrmUI
{
@@ -17,6 +19,39 @@
        {
            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();
        }
    }
}