示例#1
0
 private void SetHoverOut()
 {
     try
     {
         if (Activated != null && Activated.Equals(this))
         {
             this._imageIndex = 0;
             base.BackColor   = _tempBackColor;
             Refresh();
             if (_tooltip != null)
             {
                 _tooltip.Hide(this);
             }
             Activated        = null;
             _isButtonClicked = false;
         }
     }
     catch { }
 }
示例#2
0
        void SetHoveredIn()
        {
            if (this.Enabled)
            {
                if (Activated == null || Activated.Equals(this) == false)
                {
                    if (Activated != null)
                    {
                        Activated.SetHoverOut();
                    }

                    Activated        = this;
                    this._imageIndex = 1;
                    Refresh();

                    base.BackColor = _activeBackColor;
                    if (_tooltipText != null && _tooltipText.Length > 0)
                    {
                        _tooltip.Show(_tooltipText, this, 0, this.Height);
                    }
                }
            }
        }