public static void WebControlLinkClicked(object sender, OpenExternalLinkEventArgs e) { // Although all links have "target='_blank'" added (see ParsedDocument.ToHtml()), they go through this first // unless the url is local (a bug in Awesomium) in which case this event isn't triggered, and the "target='_blank'" // takes over to avoid crashing the preview. Local resource requests where the resource doesn't exist are thrown // away. See WebControl_ResourceRequest(). var file = e.Url; if (e.Url.StartsWith(LocalRequestUrlBase)) { file = GetResourceFileName(e.Url.Replace(LocalRequestUrlBase, "")) ?? ""; if (!File.Exists(file)) { return; } } if (string.IsNullOrWhiteSpace(file)) { return; } Process.Start(file); }
private void webControl_OpenExternalLink(object sender, OpenExternalLinkEventArgs e) { if (DockPanel != null) { WebDocument doc = new WebDocument(e.Url); doc.Show(DockPanel); } }
private void OnOpenExternalLink(object sender, OpenExternalLinkEventArgs e) { // Inform the window that the web control is asking for a new window or tab. // Currently, the event does not provide information of whether this request // is the result of a user clicking on a link with target="_blank" or javascript // calling window.open() etc. We assume target="_blank" and open a new tab. // When we get this info, we will be able to support floating windows. ParentWindow.OpenURL(e.Url); }
private void OnWebViewOpenExternalLink(object sender, OpenExternalLinkEventArgs e) { if (!CheckWebView()) { return; } // For this sample, we load the URL // in the same WebView. webView.LoadURL(e.Url); }
private void Renderer_OpenExternalLink(object sender, OpenExternalLinkEventArgs e) { if (e.Url.StartsWith("local://base_request.html/")) { string str = e.Url.Replace("local://base_request.html/", ""); EditorRenderer._logger.Trace("Found local resource request: " + str); this.Editor.StatusMessage = LocalizationProvider.GetLocalizedString("InternalNavigationDisabledInLivePreview", false, "MarkdownPadStrings"); return; } string url = e.Url; url.TryStartDefaultProcess(); }
public static void WebControlLinkClicked(object sender, OpenExternalLinkEventArgs e) { // Although all links have "target='_blank'" added (see ParsedDocument.ToHtml()), they go through this first // unless the url is local (a bug in Awesomium) in which case this event isn't triggered, and the "target='_blank'" // takes over to avoid crashing the preview. Local resource requests where the resource doesn't exist are thrown // away. See WebControl_ResourceRequest(). var file = e.Url; if (e.Url.StartsWith(LocalRequestUrlBase)) { file = GetResourceFileName(e.Url.Replace(LocalRequestUrlBase, "")) ?? ""; if (!File.Exists(file)) return; } if (string.IsNullOrWhiteSpace(file)) return; Process.Start(file); }
private void OnOpenExternalLink(object sender, OpenExternalLinkEventArgs e) { Debug.Log( String.Format( "Navigating to: {0}" , e.Url ) ); // For this sample, we simply load the page to the same view. webTexture.LoadURL( e.Url ); }
private void OnWebViewOpenExternalLink( object sender, OpenExternalLinkEventArgs e ) { if ( !CheckWebView() ) return; // For this sample, we load the URL // in the same WebView. webView.LoadURL( e.Url ); }
private void internalOpenExternalLinkCallback( IntPtr caller, IntPtr url, IntPtr source ) { OpenExternalLinkEventArgs e = new OpenExternalLinkEventArgs( StringHelper.ConvertAweString( url ), StringHelper.ConvertAweString( source ) ); this.OnOpenExternalLink( this, e ); CommandManager.InvalidateRequerySuggested(); }
/// <summary> /// Raises the <see cref="OpenExternalLink"/> event. /// </summary> protected virtual void OnOpenExternalLink( object sender, OpenExternalLinkEventArgs e ) { if ( OpenExternalLink != null ) OpenExternalLink( sender, e ); }
private void Browser_OpenExternalLink(object sender, OpenExternalLinkEventArgs e) { if (string.IsNullOrWhiteSpace(e.Url)) return; Process.Start(e.Url); }
private void OnOpenExternalLink(object sender, OpenExternalLinkEventArgs e) { Debug.Log(String.Format("Navigating to: {0}", e.Url)); // For this sample, we simply load the page to the same view. webTexture.LoadURL(e.Url); }
private void internalOpenExternalLinkCallback( IntPtr caller, IntPtr url, IntPtr source ) { OpenExternalLinkEventArgs e = new OpenExternalLinkEventArgs( StringHelper.ConvertAweString( url ), StringHelper.ConvertAweString( source ) ); this.OnOpenExternalLink( this, e ); }
void WebControl_LinkClicked(object sender, OpenExternalLinkEventArgs e) { Process.Start(e.Url); }