lixiaojun
2024-11-05 e6880d3fcc4b83c5c53166d1404e24b7513b7f9a
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
55
56
57
58
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;
 
namespace Yw.WinFrmUI
{
    public partial class SetHydroJunctionListDlg : DevExpress.XtraEditors.XtraForm
    {
        public SetHydroJunctionListDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.hydroJunctionListCtrl1.ShowFindPanel = false;
            this.hydroJunctionListCtrl1.HydroClickEvent += HydroJunctionListCtrl1_HydroClickEvent;
            this.hydroJunctionListCtrl1.HydroChangedEvent += HydroJunctionListCtrl1_HydroChangedEvent;
        }
 
 
 
        /// <summary>
        /// 水力点击事件
        /// </summary>
        public event Action<Yw.Model.HydroParterInfo> HydroClickEvent;
        /// <summary>
        /// 水力改变事件
        /// </summary>
        public event Action<List<Yw.Model.HydroParterInfo>> HydroChangedEvent;
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo)
        {
            this.hydroJunctionListCtrl1.SetBindingData(hydroInfo);
            this.hydroJunctionListCtrl1.SetBulkSetView();
        }
 
        //水力点击事件
        private void HydroJunctionListCtrl1_HydroClickEvent(Model.HydroParterInfo obj)
        {
            this.HydroClickEvent?.Invoke(obj);
        }
 
        //水力改变事件
        private void HydroJunctionListCtrl1_HydroChangedEvent(List<Model.HydroParterInfo> obj)
        {
            this.HydroChangedEvent?.Invoke(obj);
        }
 
    }
}