Validate password before asking for save location

This commit is contained in:
MaxXor 2015-08-27 23:09:25 +02:00
parent e396f45b88
commit f528229dc6
1 changed files with 8 additions and 9 deletions

View File

@ -219,6 +219,14 @@ namespace xServer.Forms
{
string output = string.Empty;
string icon = string.Empty;
string password = txtPassword.Text;
if (password.Length < 3)
{
MessageBox.Show("Please enter a secure password with more than 3 characters.",
"Please enter a secure password", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if (chkIconChange.Checked)
{
@ -256,15 +264,6 @@ namespace xServer.Forms
try
{
string password = txtPassword.Text;
if (password.Length < 3)
{
MessageBox.Show("Please enter a secure password with more than 3 characters.",
"Please enter a secure password", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
string[] asmInfo = null;
if (chkChangeAsmInfo.Checked)
{