示例#1
0
        protected override void OnMouseClick(MouseEventArgs e)
        {
            base.OnMouseClick(e);

            foreach (CssBox box in htmlContainer.LinkRegions.Keys)
            {
                RectangleF rect = htmlContainer.LinkRegions[box];
                if (Rectangle.Round(rect).Contains(e.X, e.Y))
                {
                    //Edit start
                    //CssValue.GoLink(box.GetAttribute("href", string.Empty));
                    string href = box.GetAttribute("href", string.Empty);
                    if (LinkClick != null)
                    {
                        LinkClickEventArgs ev = new LinkClickEventArgs();
                        ev.Href = href;
                        LinkClick(this, ev);
                        if (ev.Handled)
                        {
                            return;
                        }
                    }
                    CssValue.GoLink(href);
                    //Edit End
                    return;
                }
            }
        }
 protected override void OnMouseClick(MouseEventArgs e)
 {
     base.OnMouseClick(e);
     foreach (CssBox key in this.htmlContainer.LinkRegions.Keys)
     {
         if (!Rectangle.Round(this.htmlContainer.LinkRegions[key]).Contains(e.X, e.Y))
         {
             continue;
         }
         CssValue.GoLink(key.GetAttribute("href", string.Empty));
         return;
     }
 }
        protected override void OnMouseClick(MouseEventArgs e)
        {
            base.OnMouseClick(e);

            foreach (CssBox box in htmlContainer.LinkRegions.Keys)
            {
                RectangleF rect = htmlContainer.LinkRegions[box];
                if (Rectangle.Round(rect).Contains(e.X, e.Y))
                {
                    CssValue.GoLink(box.GetAttribute("href", string.Empty));
                    return;
                }
            }
        }