假设那个事件A_Click(sender s,evenearge e)(事件函数),触发很简单,直接调用就可以了
当事调用函数就可以了,比如:a_click(null,null);//参数你自己决定
private void tsbExport_Click(object sender, EventArgs e)
{
tab_inv.SelectedTab = tabPage2;
int icount = 0, j = 0;
string FilePath = "";
icount = countSelect(dgvtotal);
if (icount <= 0)
{
MessageBox.Show("至少要选择一张单据才能导出", "提示讯息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
sfdInvoice.Filter = "文本文件(*txt)|*txt";
sfdInvoice.FileName = DateTime.Now.ToShortDateString() + "OutSaleBill.txt";
if (sfdInvoice.ShowDialog() == DialogResult.OK)
{
FilePath = sfdInvoice.FileName;
}
else
{
return;
}
tsbImport_Click(sender,e)
}
用这个程序去完成另一个程序click的要求撒...