/// <summary> /// Processing for the HtmlNavigation event /// </summary> private void OnHtmlNavigation(HtmlNavigationEventArgs args) { if (!HtmlNavigation.IsNull()) { HtmlNavigation(this, args); } } //OnHtmlNavigation
private void wb_Navigating(object sender, WebBrowserNavigatingEventArgs e) { string url = e.Url.ToString(); if (!codeNavigate) { // call the appropriate event processing var navigateArgs = new HtmlNavigationEventArgs(url); OnHtmlNavigation(navigateArgs); // process the event based on the navigation option if (navigateArgs.Cancel) { // cancel the navigation e.Cancel = true; } else if (_navigateWindow == NavigateActionOption.NewWindow) { // cancel the current navigation and load url into a new window e.Cancel = true; NavigateToUrl(url, true); } else { // continue with current navigation e.Cancel = false; } } else { // TODO Should ensure the following are no executed for the editor navigation // Scripts // Java // ActiveX Controls // Behaviors // Dialogs // continue with current navigation e.Cancel = false; } }