private void btnOk_Click(object sender, EventArgs e) { try { _booSaveInput = true; _ButtonPressed = eButtons.Ok; this.Close(); } catch (Exception) { throw; } }
private void btnCancel_Click(object sender, EventArgs e) { try { txtUserInput.Text = ""; txtDuration.Text = "00:00:00"; _booSaveInput = false; _ButtonPressed = eButtons.Cancel; this.Close(); } catch (Exception) { throw; } }
public bool checkPressedButton(eButtons button) { bool result = false; if (button == (eButtons)sequence[currentIndex]) { //OK game.soundSequence(false); updateButton(currentIndex, sequence[currentIndex], eStatus.OK); currentIndex++; result = true; } else { //KO //Meter un delay StartCoroutine(delayOnError(.5f)); } return(result); }