webbrowser的增加 删除FileDownload事件
webtest.FileDownload += new EventHandler(webtest_FileDownload); private void test2_Click(object sender, EventArgs e) { webtest.Navigate(new Uri("file:///D:/桌面/Untitled-1.html")); webtest.FileDownload += new EventHandler(webtest_FileDownload); } void webtest_FileDownload(object sender, EventArgs e) { textBox1.AppendText("文件下载完毕111111111"); } void webtest_FileDownload2(object sender, EventArgs e) { textBox1.AppendText("文件下载完毕22222222222"); }//问题 private void test2_Click(object sender, EventArgs e) { //我想在这里实现,从webtest.FileDownload 中把webtest_FileDownload事件删除,同时加上webtest_FileDownload2 ,怎么写呢?也就是下一次webtest.FileDownload 时只触发webtest_FileDownload2 }