Пример #1
0
        /// <summary>
        /// Respond to a hover over a link in a static text item
        /// </summary>
        /// <param name="item">The item that raised this event</param>
        /// <param name="args">The hover arguments</param>
        public void HandleHover(CanvasItem item, CanvasHoverArgs args)
        {
            Point scrollOffset = AutoScrollPosition;

            args.Location = new Point(args.Location.X + scrollOffset.X, args.Location.Y + scrollOffset.Y);
            if (LinkHover != null)
            {
                LinkHover(item, args);
            }
        }
Пример #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 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);
 }
Пример #4
0
 /// <summary>
 /// Raises a hover on a component in the canvas item.
 /// </summary>
 /// <param name="args">Link hover arguments</param>
 public void RaiseHover(CanvasHoverArgs args)
 {
     _view.HandleHover(this, args);
 }
Пример #5
0
 /// <summary>
 /// Respond to a hover over a link in a static text item
 /// </summary>
 /// <param name="item">The item that raised this event</param>
 /// <param name="args">The hover arguments</param>
 public void HandleHover(CanvasItem item, CanvasHoverArgs args)
 {
     Point scrollOffset = AutoScrollPosition;
     args.Location = new Point(args.Location.X + scrollOffset.X, args.Location.Y + scrollOffset.Y);
     if (LinkHover != null)
     {
         LinkHover(item, args);
     }
 }
Пример #6
0
 /// <summary>
 /// User hovered over a link in the message. If it is a CIX link, get the message it
 /// references and show the initial part as a tooltip.
 /// </summary>
 private void OnLinkHovered(object sender, CanvasHoverArgs e)
 {
     if (e.Link.StartsWith("cix:", StringComparison.OrdinalIgnoreCase))
     {
         CIXMessage message = FoldersTree.MainForm.MessageFromAddress(e.Link);
         if (message != null)
         {
             _tooltip.Show(message.Body.TruncateByWordWithLimit(200),
                             tsvMessagePane,
                             e.Location.X,
                             e.Location.Y,
                             2500);
         }
     }
 }
Пример #7
0
 /// <summary>
 /// Raises a hover on a component in the canvas item.
 /// </summary>
 /// <param name="args">Link hover arguments</param>
 public void RaiseHover(CanvasHoverArgs args)
 {
     _view.HandleHover(this, args);
 }