private void axWebBrowser_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { string theFullFileName = GetFullFileNameFromHtmlLink(e.uRL.ToString()); int indexResultFile = -1; indexResultFile = theFullFileName.IndexOf("*", 0); if (indexResultFile != -1) { e.cancel = true; } else { if (theFullFileName.ToLower().IndexOf(".xml") != -1) // The user has selected a results file tag or has pressed a link in a HTML file. // Convert the XML file to HTML, cancel this request and request viewing of the generated HTML file. { // Cancel it. We want to show the generated HTML file. // As a result of calling _TCM_ValidationResultsManager.ShowHtml(e.uRL.ToString()), this method will // be called again. e.cancel = true; string htmlFullFileName = theFullFileName.ToLower().Replace(".xml", ".html"); // Do the actual conversion from XML to HTML. ConvertXmlToHtml(theFullFileName, htmlFullFileName); Navigate(htmlFullFileName); } else { // Do nothing, This is a HTML file and will be automatically shown. } } }
private void webDescription_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { string name = Path.GetFileNameWithoutExtension(e.uRL.ToString()); if (name != "sample") { tvSampleList.SelectedNode = NodeByName(tvSampleList.Nodes[0], name); } webDescription.NavigateComplete2 -= new AxSHDocVw.DWebBrowserEvents2_NavigateComplete2EventHandler(webDescription_NavigateComplete2); }
private void dummyBrowser_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { e.cancel = true; if (!doubleCountCheck) { BrowserShow.browserOpen((string)e.uRL); // ここでブラウザオープン抑制 doubleCountCheck = true; } else { doubleCountCheck = false; } }
private void axLunchWebsite(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { try { string str = e.uRL.ToString(); if (str == "javascript:check();") { return; } if (Regex.IsMatch(str, "www.compassnav.com")) { if (str.IndexOf(".php") < 0) { object oUrl; object ojunk = new object(); axWebBrowser1.Stop(); oUrl = "http://www.compassnav.com/application/webshare.php"; axWebBrowser1.Navigate2(ref oUrl, ref ojunk, ref ojunk, ref ojunk, ref ojunk); //System.Windows.Forms.MessageBox.Show(e.uRL.ToString()); StopNavigation = true; Client.ClientUI.getInstance().shareBrowserForWebFiles(str); //Client.ClientUI. shareBrowserForWebFiles(str); } else { StopNavigation = false; } } else { object oUrl; object ojunk = new object(); axWebBrowser1.Stop(); oUrl = "http://www.compassnav.com/application/webshare.php"; axWebBrowser1.Navigate2(ref oUrl, ref ojunk, ref ojunk, ref ojunk, ref ojunk); //System.Windows.Forms.MessageBox.Show(e.uRL.ToString()); StopNavigation = true; Client.ClientUI.getInstance().shareBrowserForWebFiles(str); //Client.ClientUI. shareBrowserForWebFiles(str); } } catch (Exception exp) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("ManageContents ===>ManageContentWebPresentation.cs line==> 388", exp, null, false); } // }
private void AxWebBrowser1_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { tscmbURL.Text = e.uRL.ToString(); }
void webBrowser_BeforeNavigate2(object sender, AxSHDocVw.DWebBrowserEvents2_BeforeNavigate2Event e) { e.flags = toolStripButton12.Checked?1:0; }