private void btnEnter_Click(object sender, EventArgs e) { if (txtPassword.Text == "4817") { this.Close(); } else { MessageBoxOperation.MessageBoxError("Hatalı parola girdiniz."); txtPassword.Text = ""; txtPassword.Focus(); } }
void tryCatchBlock(Action action) { try { driver = new ChromeDriver(); drivers.Add(driver); action.Invoke(); } catch (Exception exception) { //throw exception; MessageBoxOperation.MessageBoxError(exception.Message); } }