Adjusted Login Form

This commit is contained in:
Serraniel 2017-01-28 17:50:56 +01:00
parent 29c9381f3a
commit 0e47254e87
2 changed files with 10 additions and 0 deletions

View file

@ -61,6 +61,7 @@
this.tbxEmail.Name = "tbxEmail";
this.tbxEmail.Size = new System.Drawing.Size(204, 20);
this.tbxEmail.TabIndex = 2;
this.tbxEmail.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp);
//
// tbxPassword
//
@ -69,6 +70,7 @@
this.tbxPassword.PasswordChar = '•';
this.tbxPassword.Size = new System.Drawing.Size(204, 20);
this.tbxPassword.TabIndex = 3;
this.tbxPassword.KeyUp += new System.Windows.Forms.KeyEventHandler(this.tbx_KeyUp);
//
// btnLogin
//

View file

@ -41,5 +41,13 @@ namespace Discord_Media_Loader
{
DialogResult = DialogResult.OK;
}
private void tbx_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Return)
DialogResult = DialogResult.OK;
else if (e.KeyCode == Keys.Escape)
DialogResult = DialogResult.Abort;
}
}
}