110,536
社区成员
发帖
与我相关
我的任务
分享
用事件、委托
打开另一个界面的事件
private void btn_Click(object sender, EventArgs e)
{
A detail=new A();
detail.OperateComplate += new BugOrderDetail.QCOrderHandler(detail_OperateComplate);
}
void detail_OperateComplate(int index)
{
tabcontrol. SelectedIndex=index;
}
另一个界面
public delegate void ChangeIndexHandler(int index);
public event ChangeIndexHandler OperateComplate;
private void btn_Click(object sender, EventArgs e)
{
OperateComplate(要选中的TabControl索引);
}