示例#1
0
文件: Util.cs 项目: waralper1/CKAN
        /// <summary>
        /// React to the user clicking a mouse button on a link.
        /// Opens the URL in browser on left click, presents a
        /// right click menu on right click.
        /// </summary>
        /// <param name="url">The link's URL</param>
        /// <param name="e">The click event</param>
        public static void HandleLinkClicked(string url, LinkLabelLinkClickedEventArgs e)
        {
            switch (e.Button)
            {
            case MouseButtons.Left:
                Util.OpenLinkFromLinkLabel(url);
                break;

            case MouseButtons.Right:
                Util.LinkContextMenu(url);
                break;
            }
        }
示例#2
0
 private void LinkLabel_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     Util.OpenLinkFromLinkLabel(sender as LinkLabel);
 }