コード例 #1
0
ファイル: HtmlLabel.cs プロジェクト: cixonline/cixreader
        /// <summary>
        /// Propagate the LinkHover event from root container.
        /// </summary>
        protected virtual void OnLinkHover(HtmlLinkHoverEventArgs e)
        {
            var handler = LinkHover;

            if (handler != null)
            {
                handler(this, e);
            }
        }
コード例 #2
0
        /// <summary>
        /// Handle hover over a link.
        /// </summary>
        /// <param name="sender">The control</param>
        /// <param name="args">The link hover arguments</param>
        private void OnLinkHover(object sender, HtmlLinkHoverEventArgs args)
        {
            CanvasHoverArgs newArgs = new CanvasHoverArgs
            {
                Component = this,
                Link      = args.Link,
                Location  = new Point((int)args.Location.X + Bounds.X, (int)args.Location.Y + Bounds.Y)
            };

            _layout.Container.RaiseHover(newArgs);
        }
コード例 #3
0
        /// <summary>
        /// Handle link hover going over <see cref="LinkHover"/> event.
        /// </summary>
        /// <param name="parent">the control hosting the html to invalidate</param>
        /// <param name="location">the location of the mouse</param>
        /// <param name="link">the link that was hovered</param>
        internal void HandleLinkHover(RControl parent, RPoint location, CssBox link)
        {
            EventHandler <HtmlLinkHoverEventArgs> hoverHandler = LinkHover;

            if (hoverHandler != null)
            {
                var args = new HtmlLinkHoverEventArgs(link.HrefLink, location, link.HtmlTag.Attributes);
                try
                {
                    hoverHandler(this, args);
                }
                catch (Exception ex)
                {
                    throw new HtmlLinkClickedException("Error in link hover intercept", ex);
                }
            }
        }
コード例 #4
0
ファイル: HtmlLabel.cs プロジェクト: cixonline/cixreader
 private void OnLinkHover(object sender, HtmlLinkHoverEventArgs e)
 {
     OnLinkHover(e);
 }