OpenWebLink() public static method

Open an HTML link in an external web browser application.
public static OpenWebLink ( string html ) : void
html string
return void
示例#1
0
        /// <summary>
        /// User clicked on the "web" button to the left of the git repo address.
        /// Find the canonical web site and open it
        /// </summary>
        private void BtWwwClick(object sender, EventArgs e)
        {
            string key = ((Button)sender).Tag.ToString();

            ClassUrl.Url url = key == "Fetch" ? _fetchUrl : _pushUrl;
            // Find a generic host name
            string target = "http://" + url.Host;

            // Detect some special hosts for which we can form a complete path
            if (url.Host.Contains("github"))
            {
                target += "/" + url.Path;
            }
            if (url.Host.Contains(".code.sf.net"))
            {
                target = "https://sourceforge.net/projects/" + url.Name;
            }
            ClassUtils.OpenWebLink(target);
        }
示例#2
0
 /// <summary>
 /// Open the web browser with a link to msysgit
 /// </summary>
 private void GitLinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     ClassUtils.OpenWebLink(linkLabel.Tag.ToString());
 }
示例#3
0
 /// <summary>
 /// Called when the user clicks on an HTML link inside the output text.
 /// </summary>
 private void textLinkClicked(object sender, LinkClickedEventArgs e)
 {
     ClassUtils.OpenWebLink(e.LinkText);
 }