Ejemplo n.º 1
0
    void OnMouseUpAsButton()
    {
        if(state!=btnState.disable){
            state = btnState.hover;

            if(ifcEvento!=null) ifcEvento();// Informar que se pulso el boton
        }
    }
Ejemplo n.º 2
0
 private void BitmapButton_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Space)
     {
         imgState = btnState.BUTTON_DOWN;
         Invalidate();
     }
 }
Ejemplo n.º 3
0
 void RectButton_MouseDown(object sender, MouseEventArgs e)
 {
     if (!CheckMouseHover())
     {
         return;
     }
     _state = btnState.BUTTON_DOWN;
     Invalidate();
 }
Ejemplo n.º 4
0
 private void BitmapButton_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyData == Keys.Space)
     {
         // still has focus
         imgState = btnState.BUTTON_FOCUSED;
         Invalidate();
     }
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 7
0
 void RectButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         _state = btnState.BUTTON_UP;
     }
     else
     {
         _state = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
Ejemplo n.º 8
0
		private void BitmapButton_LostFocus(object sender, EventArgs e)
		{
			if (mouseEnter)
			{
				imgState=btnState.BUTTON_MOUSE_ENTER;
			}
			else
			{
				imgState=btnState.BUTTON_UP;
			}
			Invalidate();
		}
Ejemplo n.º 9
0
 private void BitmapButton_LostFocus(object sender, EventArgs e)
 {
     if (mouseEnter)
     {
         imgState = btnState.BUTTON_MOUSE_ENTER;
     }
     else
     {
         imgState = btnState.BUTTON_UP;
     }
     Invalidate();
 }
Ejemplo n.º 10
0
 private void BitmapButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         imgState = btnState.BUTTON_UP;
     }
     else
     {
         imgState = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
Ejemplo n.º 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 });
                }
            }
        }
Ejemplo n.º 12
0
 void OnMouseEnter()
 {
     if(state!=btnState.disable)
         state = btnState.hover;
 }
Ejemplo n.º 13
0
 void OnMouseExit()
 {
     if(state!=btnState.disable)
         state = btnState.idle;
 }
Ejemplo n.º 14
0
		private void BitmapButton_KeyDown(object sender, KeyEventArgs e)
		{
			if (e.KeyData==Keys.Space)
			{
				imgState=btnState.BUTTON_DOWN;
				Invalidate();
			}
		}
Ejemplo n.º 15
0
 private void BitmapButton_GotFocus(object sender, EventArgs e)
 {
     imgState = btnState.BUTTON_FOCUSED;
     Invalidate();
 }
Ejemplo n.º 16
0
		private void BitmapButton_EnabledChanged(object sender, EventArgs e)
		{
			if (Enabled)
			{
				imgState=btnState.BUTTON_UP;
			}
			else
			{
				imgState=btnState.BUTTON_DISABLED;
			}
			Invalidate();
		}
Ejemplo n.º 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();
		}
Ejemplo n.º 18
0
 void RectButton_EnabledChanged(object sender, EventArgs e)
 {
     if (Enabled)
     {
         _state = btnState.BUTTON_UP;
     }
     else
     {
         _state = btnState.BUTTON_DISABLED;
     }
     Invalidate();
 }
Ejemplo n.º 19
0
 void OnMouseDown()
 {
     if(state!=btnState.disable)
         state = btnState.pushed;
 }
Ejemplo n.º 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();
		}
Ejemplo n.º 21
0
		private void BitmapButton_GotFocus(object sender, EventArgs e)
		{
			imgState=btnState.BUTTON_FOCUSED;
			Invalidate();
		}
Ejemplo n.º 22
0
		private void BitmapButton_MouseUp(object sender, MouseEventArgs e)
		{
			imgState=btnState.BUTTON_FOCUSED;
			Invalidate();
		}
Ejemplo n.º 23
0
		private void BitmapButtonMouseDow_n(object sender, MouseEventArgs e)
		{
			imgState=btnState.BUTTON_DOWN;
			Invalidate();
		}
Ejemplo n.º 24
0
 private void BitmapButton_MouseDown(object sender, MouseEventArgs e)
 {
     imgState = btnState.BUTTON_DOWN;
     Invalidate();
 }
Ejemplo n.º 25
0
 void RectButton_MouseDown(object sender, MouseEventArgs e)
 {
     if (!CheckMouseHover())
         return;
     _state = btnState.BUTTON_DOWN;
     Invalidate();
 }
Ejemplo n.º 26
0
 private void BitmapButton_MouseUp(object sender, MouseEventArgs e)
 {
     imgState = btnState.BUTTON_FOCUSED;
     Invalidate();
 }
Ejemplo n.º 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 });
                }
            }
        }
Ejemplo n.º 28
0
 void Awake()
 {
     state = btnState.idle;
 }
Ejemplo n.º 29
0
		private void BitmapButton_KeyUp(object sender, KeyEventArgs e)
		{
			if (e.KeyData==Keys.Space)
			{
				// still has focus
				imgState=btnState.BUTTON_FOCUSED;
				Invalidate();
			}
		}