zoukankan      html  css  js  c++  java
  • c# event事件传递参数

    public class SeatChoosenEventArgs : EventArgs
        {
            public 呼叫中心工号核对表Entity SeatChoosen;
        }
    
    
    
      public partial class UCSeatIcon : UserControl
    {
         private 呼叫中心工号核对表Entity _entity;
    public event EventHandler<SeatChoosenEventArgs> SeatChoosenEvent; private void pictureBox1_Click(object sender, EventArgs e) { if (SeatChoosenEvent != null) { SeatChoosenEvent(this, new SeatChoosenEventArgs() { SeatChoosen = _entity }); } } }
    public partial class UCSeatDetailNew : UserControl
    {
          UCSeatIcon1.SeatChoosenEvent += UCSeatChoose_SeatChoosenEvent;
         
          public void UCSeatChoose_SeatChoosenEvent(object sender, SeatChoosenEventArgs e)
            {
                //if (SeatChoosenEvent != null)
                //{
                //    SeatChoosenEvent(sender, e);
                //}
                呼叫中心工号核对表Entity t =  e.SeatChoosen;
                UCSeatIcon seatIcon = (UCSeatIcon)sender;
                ActivePeople(seatIcon);
            }
    }
  • 相关阅读:
    9.对话框
    8.布局管理器
    7.对象模型
    6.添加动作
    5.Qt模块简介
    4.自定义信号槽
    3.信号槽
    2.Helloworld
    1.Qt简介
    Problem E: 成绩排序
  • 原文地址:https://www.cnblogs.com/liuxinls/p/3075834.html
Copyright © 2011-2022 走看看