/// <summary> /// Occurs only on WinXP /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AxWebBrowser_NewWindow3(object sender, DWebBrowserEvents2_NewWindow3Event e) { if (e == null) { return; } if (e.url == null) { return; } if (this.tabs[e.url] == null) { CreateBrowser(e.url); e.cancel = true; } }
private void axWebBrowser1_NewWindow3(object sender, DWebBrowserEvents2_NewWindow3Event e) { if (e.bstrUrl.ToLower().Contains("default.aspx")) { this.axWebBrowser1.Navigate(e.bstrUrl); e.cancel = true; } else { FrmWebDialog dialog = new FrmWebDialog(e.bstrUrl); dialog.ShowDialog(); e.cancel = true; this.InitView(this.GetRFFYDInfo()); dialog.Text = e.bstrUrl; } }
private void DownloadQuickRosterNewWindowDelegate(object sender, DWebBrowserEvents2_NewWindow3Event e) { // at this point, e.bstrUrlContext has the URL to the CSV schedule file!!! WebClient wc = new WebClient(); object missing = System.Type.Missing; // copy the file directly to the output filenames string sFile = m_ebRoster.Text; wc.DownloadFile(e.bstrUrl, sFile); }
static void wBrowser_NewWindow3(object sender, DWebBrowserEvents2_NewWindow3Event e) { e.cancel = true; }
private void DownloadGamesNewWindowDelegate(object sender, DWebBrowserEvents2_NewWindow3Event e) { // at this point, e.bstrUrlContext has the URL to the XLS schedule file!!! WebClient wc = new WebClient(); string sFile = String.Format("{0}\\{1}", Environment.GetEnvironmentVariable("temp"), System.Guid.NewGuid().ToString()); wc.DownloadFile(e.bstrUrl, sFile); HandleDownloadGames(sFile); System.IO.File.Delete(sFile); }