cloudflight
2024-12-24 97a43bf839f59cdda1641d61706e6e71a0c5e172
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
53
54
namespace HStation.WinFrmUI
{
    public partial class SimulationSinglePumpFeatDlg : DevExpress.XtraBars.Ribbon.RibbonForm
    {
        public SimulationSinglePumpFeatDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.simulationSinglePumpFeatCtrl1.SaveEvent += SimulationSinglePumpFeatCtrl1_SaveEvent;
        }
 
        /// <summary>
        /// 保存事件
        /// </summary>
        public event Action<HydroWorkingPumpViewModel> SaveEvent;
 
        private void SimulationSinglePumpFeatCtrl1_SaveEvent(HydroWorkingPumpViewModel working)
        {
            this.SaveEvent?.Invoke(working);
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(HydroPumpViewModel pumpViewModel, HydroCalcuResult calcuResult)
        {
            if (pumpViewModel == null)
            {
                return;
            }
            SetBindingData(pumpViewModel.HydroInfo, pumpViewModel.Vmo, calcuResult);
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData
            (
                Yw.Model.HydroModelInfo hydroInfo,
                Yw.Model.HydroPumpInfo pumpInfo,
                HydroCalcuResult calcuResult
            )
        {
            this.simulationSinglePumpFeatCtrl1.SetBindingData(hydroInfo, pumpInfo, calcuResult);
        }
 
        private void SimulationPumpFeatDlg_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.simulationSinglePumpFeatCtrl1.Save();
        }
 
 
    }
}