void OnMouseUpAsButton() { if(state!=btnState.disable){ state = btnState.hover; if(ifcEvento!=null) ifcEvento();// Informar que se pulso el boton } }
private void BitmapButton_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Space) { imgState = btnState.BUTTON_DOWN; Invalidate(); } }
void RectButton_MouseDown(object sender, MouseEventArgs e) { if (!CheckMouseHover()) { return; } _state = btnState.BUTTON_DOWN; Invalidate(); }
private void BitmapButton_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Space) { // still has focus imgState = btnState.BUTTON_FOCUSED; Invalidate(); } }
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(); }
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(); }
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(); }
private void BitmapButton_LostFocus(object sender, EventArgs e) { if (mouseEnter) { imgState = btnState.BUTTON_MOUSE_ENTER; } else { imgState = btnState.BUTTON_UP; } Invalidate(); }
private void BitmapButton_EnabledChanged(object sender, EventArgs e) { if (Enabled) { imgState = btnState.BUTTON_UP; } else { imgState = btnState.BUTTON_DISABLED; } Invalidate(); }
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 }); } } }
void OnMouseEnter() { if(state!=btnState.disable) state = btnState.hover; }
void OnMouseExit() { if(state!=btnState.disable) state = btnState.idle; }
private void BitmapButton_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData==Keys.Space) { imgState=btnState.BUTTON_DOWN; Invalidate(); } }
private void BitmapButton_GotFocus(object sender, EventArgs e) { imgState = btnState.BUTTON_FOCUSED; Invalidate(); }
private void BitmapButton_EnabledChanged(object sender, EventArgs e) { if (Enabled) { imgState=btnState.BUTTON_UP; } else { imgState=btnState.BUTTON_DISABLED; } Invalidate(); }
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(); }
void OnMouseDown() { if(state!=btnState.disable) state = btnState.pushed; }
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(); }
private void BitmapButton_GotFocus(object sender, EventArgs e) { imgState=btnState.BUTTON_FOCUSED; Invalidate(); }
private void BitmapButton_MouseUp(object sender, MouseEventArgs e) { imgState=btnState.BUTTON_FOCUSED; Invalidate(); }
private void BitmapButtonMouseDow_n(object sender, MouseEventArgs e) { imgState=btnState.BUTTON_DOWN; Invalidate(); }
private void BitmapButton_MouseDown(object sender, MouseEventArgs e) { imgState = btnState.BUTTON_DOWN; Invalidate(); }
void RectButton_MouseDown(object sender, MouseEventArgs e) { if (!CheckMouseHover()) return; _state = btnState.BUTTON_DOWN; Invalidate(); }
private void BitmapButton_MouseUp(object sender, MouseEventArgs e) { imgState = btnState.BUTTON_FOCUSED; Invalidate(); }
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 }); } } }
void Awake() { state = btnState.idle; }
private void BitmapButton_KeyUp(object sender, KeyEventArgs e) { if (e.KeyData==Keys.Space) { // still has focus imgState=btnState.BUTTON_FOCUSED; Invalidate(); } }