From ab9216cbc241a48c64b5fb1f83be5fae56fdf6c7 Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Mon, 6 Jul 2020 15:22:14 +0700 Subject: [PATCH] LoginForm - Add AcceptButton. --- AIParkingApplication/LoginForm.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AIParkingApplication/LoginForm.cs b/AIParkingApplication/LoginForm.cs index 720736f..e789aa8 100644 --- a/AIParkingApplication/LoginForm.cs +++ b/AIParkingApplication/LoginForm.cs @@ -15,9 +15,10 @@ namespace AIParkingApplication lblLoginStatus.Text = string.Empty; apiController = new ApiController(serverBaseAddress); + this.AcceptButton = btnLogin; } - private async void btnLogin_Click(object sender, System.EventArgs e) + private async void Login() { lblLoginStatus.Text = string.Empty; string username = txtUsername.Text; @@ -39,6 +40,11 @@ namespace AIParkingApplication } } + private void btnLogin_Click(object sender, System.EventArgs e) + { + Login(); + } + private void btnExit_Click(object sender, System.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))