Example #1
0
 protected override void OnKeyUp(KeyEventArgs e)
 {
     if (e.KeyData == Keys.Enter || e.KeyData == Keys.Space)
     {
         if (!this.IsArrowButton)
         {
             e.Handled         = true;
             isSelected        = true;
             this.PaintingType = PaintType.Selected;
             NavigateBarButton.PerformClick();
         }
     }
     else
     {
         base.OnKeyUp(e);
     }
 }
Example #2
0
 protected override void OnMouseClick(MouseEventArgs e)
 {
     base.OnMouseClick(e);
     toolTip.RemoveAll();
     // Only left click
     if (e.Button == MouseButtons.Left && !this.IsArrowButton) // Sadece sol click ile button seçilebilmeli
     {
         this.IsSelected   = true;
         this.PaintingType = PaintType.Selected;
         NavigateBarButton.PerformClick();
     }
     else
     {
         if (!this.IsArrowButton)
         {
             Point p = this.PointToScreen(new Point(this.Location.X - this.Left + this.Width, this.Location.Y));
             NavigateBarButton.ButtonMenu.Show(p);
         }
     }
 }