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);
|
}
|
|
}
|
}
|