示例#1
0
 /// <summary>
 /// Raises the CloseIconHoverStat changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected override void OnCloseIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     Invalidate(this.RectangleCloseIcon);
     base.OnCloseIconHoverStateChanged(sender, e);
 }
示例#2
0
 /// <summary>
 /// Raises the ExpandIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected override void OnExpandIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     Invalidate(this.RectangleExpandIcon);
      base.OnExpandIconHoverStateChanged(sender, e);
 }
示例#3
0
 /// <summary>
 /// Raises the ExpandIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnExpandIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (e.HoverState == HoverState.Hover)
     {
         if (this.Cursor != Cursors.Hand)
         {
             this.Cursor = Cursors.Hand;
             if (this.Expand == true)
             {
                 if (this is Panel)
                 {
                     if (string.IsNullOrEmpty(this.m_strToolTipTextExpandIconPanelExpanded) == false)
                     {
                         this.m_toolTip.SetToolTip(this, this.m_strToolTipTextExpandIconPanelExpanded);
                     }
                 }
             }
             else
             {
                 if (string.IsNullOrEmpty(this.m_strToolTipTextExpandIconPanelCollapsed) == false)
                 {
                     this.m_toolTip.SetToolTip(this, this.m_strToolTipTextExpandIconPanelCollapsed);
                 }
             }
         }
     }
     else
     {
         if (this.Cursor == Cursors.Hand)
         {
             this.m_toolTip.SetToolTip(this, string.Empty);
             this.m_toolTip.Hide(this);
             this.Cursor = Cursors.Default;
         }
     }
     if (this.ExpandIconHoverStateChanged != null)
     {
         this.ExpandIconHoverStateChanged(sender, e);
     }
 }
示例#4
0
 /// <summary>
 /// Raises the CloseIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnCloseIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (e.HoverState == HoverState.Hover)
     {
         if (this.Cursor != Cursors.Hand)
         {
             this.Cursor = Cursors.Hand;
         }
         if (string.IsNullOrEmpty(this.m_strToolTipTextCloseIcon) == false)
         {
             this.m_toolTip.SetToolTip(this, this.m_strToolTipTextCloseIcon);
         }
     }
     else
     {
         if (this.Cursor == Cursors.Hand)
         {
             this.m_toolTip.SetToolTip(this, string.Empty);
             this.m_toolTip.Hide(this);
             this.Cursor = Cursors.Default;
         }
     }
     if (this.CloseIconHoverStateChanged != null)
     {
         this.CloseIconHoverStateChanged(sender, e);
     }
 }
示例#5
0
 /// <summary>
 /// Raises the CaptionBarHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected virtual void OnCaptionBarHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     if (this is XPanderPanel)
     {
         if (e.HoverState == HoverState.Hover)
         {
             if ((this.ShowCloseIcon == false) && (this.ShowExpandIcon == false))
             {
                 if (this.Cursor != Cursors.Hand)
                 {
                     this.Cursor = Cursors.Hand;
                 }
             }
         }
         else
         {
             if (this.Cursor == Cursors.Hand)
             {
                 this.Cursor = Cursors.Default;
             }
         }
         this.Invalidate(CaptionRectangle);
     }
     if (this.CaptionBarHoverStateChanged != null)
     {
         this.CaptionBarHoverStateChanged(sender, e);
     }
 }
示例#6
0
文件: Panel.cs 项目: regous/GMap.NET
 /// <summary>
 ///     Raises the ExpandIconHoverState changed event.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">A HoverStateChangeEventArgs that contains the event data.</param>
 protected override void OnExpandIconHoverStateChanged(object sender, HoverStateChangeEventArgs e)
 {
     Invalidate(RectangleExpandIcon);
     base.OnExpandIconHoverStateChanged(sender, e);
 }