lixiaojun
2024-12-23 ad4360df5a1245151efc826bee69b63946426891
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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();
        }
    }
}