lixiaojun
2024-11-09 c9585ab171fb973d16792d7a290994bf8279da63
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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 SetHydroBluntheadListDlg : DevExpress.XtraEditors.XtraForm
    {
        public SetHydroBluntheadListDlg()
        {
            InitializeComponent();
            this.IconOptions.Icon = Yw.WinFrmUI.GlobalParas.AppIcon;
            this.hydroBluntheadListCtrl1.ShowFindPanel = false;
            this.hydroBluntheadListCtrl1.HydroClickInfoEvent += HydroBluntheadListCtrl1_HydroClickInfoEvent;
            this.hydroBluntheadListCtrl1.HydroClickViewEvent += HydroBluntheadListCtrl1_HydroClickViewEvent;
            this.hydroBluntheadListCtrl1.HydroChangedInfoEvent += HydroBluntheadListCtrl1_HydroChangedInfoEvent;
            this.hydroBluntheadListCtrl1.HydroChangedViewEvent += HydroBluntheadListCtrl1_HydroChangedViewEvent;
        }
 
 
        /// <summary>
        /// 水力点击事件
        /// </summary>
        public event Action<Yw.Model.HydroVisualInfo> HydroClickInfoEvent;
        /// <summary>
        /// 水力点击视图事件
        /// </summary>
        public event Action<HydroVisualViewModel> HydroClickViewEvent;
        /// <summary>
        /// 水力改变事件
        /// </summary>
        public event Action<List<Yw.Model.HydroVisualInfo>> HydroChangedInfoEvent;
        /// <summary>
        /// 水力改变视图事件
        /// </summary>
        public event Action<List<HydroVisualViewModel>> HydroChangedViewEvent;
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(Yw.Model.HydroModelInfo hydroInfo)
        {
            this.hydroBluntheadListCtrl1.SetBindingData(hydroInfo);
            this.hydroBluntheadListCtrl1.SetBulkSetView();
        }
 
        /// <summary>
        /// 绑定数据
        /// </summary>
        public void SetBindingData(List<HydroVisualViewModel> allVisualViewModelList)
        {
            this.hydroBluntheadListCtrl1.SetBindingData(allVisualViewModelList);
            this.hydroBluntheadListCtrl1.SetBulkSetView();
        }
 
        //水力点击信息事件
        private void HydroBluntheadListCtrl1_HydroClickInfoEvent(Model.HydroVisualInfo obj)
        {
            this.HydroClickInfoEvent?.Invoke(obj);
        }
 
        //水力点击视图事件
        private void HydroBluntheadListCtrl1_HydroClickViewEvent(HydroVisualViewModel obj)
        {
            this.HydroClickViewEvent?.Invoke(obj);
        }
 
        //水力改变信息事件
        private void HydroBluntheadListCtrl1_HydroChangedInfoEvent(List<Model.HydroVisualInfo> obj)
        {
            this.HydroChangedInfoEvent?.Invoke(obj);
        }
 
        //水力改变视图事件
        private void HydroBluntheadListCtrl1_HydroChangedViewEvent(List<HydroVisualViewModel> obj)
        {
            this.HydroChangedViewEvent?.Invoke(obj);
        }
 
    }
}