Ejemplo n.º 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))
                {
                    CssValue.GoLink(box.GetAttribute("href", string.Empty));
                    return;
                }
            }
        }
Ejemplo n.º 2
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))
                {
                    string             href = box.GetAttribute("href", string.Empty);
                    LinkClickEventArgs ev   = new LinkClickEventArgs {
                        Href = href
                    };
                    OnLinkClick(ev);
                    if (ev.Handled)
                    {
                        return;
                    }
                    CssValue.GoLink(href);
                    return;
                }
            }
        }