Example #1
0
    void OnMouseUpAsButton()
    {
        if(state!=btnState.disable){
            state = btnState.hover;

            if(ifcEvento!=null) ifcEvento();// Informar que se pulso el boton
        }
    }
Example #2
0
 private void BitmapButton_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Space)
     {
         imgState = btnState.BUTTON_DOWN;
         Invalidate();
     }
 }
Example #3
0
 void RectButton_MouseDown(object sender, MouseEventArgs e)
 {
     if (!CheckMouseHover())
     {
         return;
     }
     _state = btnState.BUTTON_DOWN;
     Invalidate();
 }
Example #4
0
 private void BitmapButton_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Space)
     {
         // still has focus
         imgState = btnState.BUTTON_FOCUSED;
         Invalidate();
     }
 }
Example #5
0
 private void BitmapButton_MouseLeave(object sender, EventArgs e)
 {
     // only restore state if doesn't have focus
     if (imgState != btnState.BUTTON_FOCUSED)
     {
         imgState = btnState.BUTTON_UP;
     }
     mouseEnter = false;
     Invalidate();
 }
Example #6
0
 private void BitmapButton_MouseEnter(object sender, EventArgs e)
 {
     // only show mouse enter if doesn't have focus
     if (imgState == btnState.BUTTON_UP)
     {
         imgState = btnState.BUTTON_MOUSE_ENTER;
     }
     mouseEnter = true;
     Invalidate();
 }
Example #7
0
 void RectButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         _state = btnState.BUTTON_UP;
     }
     else
     {
         _state = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
		private void BitmapButton_LostFocus(object sender, EventArgs e)
		{
			if (mouseEnter)
			{
				imgState=btnState.BUTTON_MOUSE_ENTER;
			}
			else
			{
				imgState=btnState.BUTTON_UP;
			}
			Invalidate();
		}
Example #9
0
 private void BitmapButton_LostFocus(object sender, EventArgs e)
 {
     if (mouseEnter)
     {
         imgState = btnState.BUTTON_MOUSE_ENTER;
     }
     else
     {
         imgState = btnState.BUTTON_UP;
     }
     Invalidate();
 }
Example #10
0
 private void BitmapButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         imgState = btnState.BUTTON_UP;
     }
     else
     {
         imgState = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
Example #11
0
        void RectButton_MouseUp(object sender, MouseEventArgs e)
        {
            if (!CheckMouseHover())
            {
                return;
            }
            _state = btnState.BUTTON_FOCUSED;
            Invalidate();


            if (ValidClick != null)
            {
                if (ValidClick.Target != null)
                {
                    this.Invoke(ValidClick, new object[] { this, e });
                }
            }
        }
Example #12
0
 void OnMouseEnter()
 {
     if(state!=btnState.disable)
         state = btnState.hover;
 }
Example #13
0
 void OnMouseExit()
 {
     if(state!=btnState.disable)
         state = btnState.idle;
 }
Example #14
0
		private void BitmapButton_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData==Keys.Space)
			{
				imgState=btnState.BUTTON_DOWN;
				Invalidate();
			}
		}
Example #15
0
 private void BitmapButton_GotFocus(object sender, EventArgs e)
 {
     imgState = btnState.BUTTON_FOCUSED;
     Invalidate();
 }
Example #16
0
		private void BitmapButton_EnabledChanged(object sender, EventArgs e)
		{
			if (Enabled)
			{
				imgState=btnState.BUTTON_UP;
			}
			else
			{
				imgState=btnState.BUTTON_DISABLED;
			}
			Invalidate();
		}
Example #17
0
		private void BitmapButton_MouseLeave(object sender, EventArgs e)
		{
			// only restore state if doesn't have focus
			if (imgState != btnState.BUTTON_FOCUSED)
			{
				imgState=btnState.BUTTON_UP;
			}
			mouseEnter=false;
			Invalidate();
		}
Example #18
0
 void RectButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         _state = btnState.BUTTON_UP;
     }
     else
     {
         _state = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
Example #19
0
 void OnMouseDown()
 {
     if(state!=btnState.disable)
         state = btnState.pushed;
 }
Example #20
0
		private void BitmapButton_MouseEnter(object sender, EventArgs e)
		{
			// only show mouse enter if doesn't have focus
			if (imgState==btnState.BUTTON_UP)
			{
				imgState=btnState.BUTTON_MOUSE_ENTER;
			}
			mouseEnter=true;
			Invalidate();
		}
Example #21
0
		private void BitmapButton_GotFocus(object sender, EventArgs e)
		{
			imgState=btnState.BUTTON_FOCUSED;
			Invalidate();
		}
Example #22
0
		private void BitmapButton_MouseUp(object sender, MouseEventArgs e)
		{
			imgState=btnState.BUTTON_FOCUSED;
			Invalidate();
		}
Example #23
0
		private void BitmapButtonMouseDow_n(object sender, MouseEventArgs e)
		{
			imgState=btnState.BUTTON_DOWN;
			Invalidate();
		}
Example #24
0
 private void BitmapButton_MouseDown(object sender, MouseEventArgs e)
 {
     imgState = btnState.BUTTON_DOWN;
     Invalidate();
 }
Example #25
0
 void RectButton_MouseDown(object sender, MouseEventArgs e)
 {
     if (!CheckMouseHover())
         return;
     _state = btnState.BUTTON_DOWN;
     Invalidate();
 }
Example #26
0
 private void BitmapButton_MouseUp(object sender, MouseEventArgs e)
 {
     imgState = btnState.BUTTON_FOCUSED;
     Invalidate();
 }
Example #27
0
        void RectButton_MouseUp(object sender, MouseEventArgs e)
        {
            if (!CheckMouseHover())
                return;
            _state = btnState.BUTTON_FOCUSED;
            Invalidate();

            if (ValidClick != null)
            {
                if (ValidClick.Target != null)
                {
                    this.Invoke(ValidClick, new object[] { this, e });
                }
            }
        }
Example #28
0
 void Awake()
 {
     state = btnState.idle;
 }
Example #29
0
		private void BitmapButton_KeyUp(object sender, KeyEventArgs e)
		{
			if (e.KeyData==Keys.Space)
			{
				// still has focus
				imgState=btnState.BUTTON_FOCUSED;
				Invalidate();
			}
		}