标签:partial use eve code click obj bsp rgs win
public partial class UcTest : UserControl { public UcTest() { InitializeComponent(); } //定义事件 public event EventHandler UserControlBtnClicked; private void btn_Click(object sender, EventArgs e) { UserControlBtnClicked?.Invoke(sender, new EventArgs());//把按钮自身作为参数传递 } }
标签:partial use eve code click obj bsp rgs win
原文地址:https://www.cnblogs.com/gaocong/p/8886218.html