LoginForm - Remove redundant code.

This commit is contained in:
DucDangAnh 2020-07-08 15:37:21 +07:00
parent 7f61711e61
commit 47a386a3f7

View File

@ -18,7 +18,7 @@ namespace AIParkingApplication
} }
txtUsername.Focus(); txtUsername.Focus();
lblLoginStatus.Text = string.Empty; lblLoginStatus.Text = string.Empty;
this.AcceptButton = btnLogin; AcceptButton = btnLogin;
} }
private async void Login() private async void Login()
@ -77,12 +77,12 @@ namespace AIParkingApplication
} }
} }
private void btnLogin_Click(object sender, System.EventArgs e) private void btnLogin_Click(object sender, EventArgs e)
{ {
Login(); Login();
} }
private void btnExit_Click(object sender, System.EventArgs e) private void btnExit_Click(object sender, EventArgs e)
{ {
if (DialogResult.OK == MessageBox.Show("AIParking - Bạn muốn thoát ứng dụng?", "Cảnh báo!", MessageBoxButtons.OKCancel, MessageBoxIcon.Question)) if (DialogResult.OK == MessageBox.Show("AIParking - Bạn muốn thoát ứng dụng?", "Cảnh báo!", MessageBoxButtons.OKCancel, MessageBoxIcon.Question))
{ {