Skip to content

Commit

Permalink
Database validation is required again when Validate DB Settings butto…
Browse files Browse the repository at this point in the history
…n is clicked
  • Loading branch information
MythicalCuddles committed Oct 6, 2019
1 parent fabf8a9 commit ce979fb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
26 changes: 13 additions & 13 deletions DiscordBot/frmConfigure.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions DiscordBot/frmConfigure.cs
Original file line number Diff line number Diff line change
Expand Up @@ -144,31 +144,26 @@ private void lblGenerateNewToken_Click(object sender, EventArgs e)
#region 3. Database Settings
private void txtDbHost_TextChanged(object sender, EventArgs e)
{
_validDbSettings = false;
InvalidateDbValidationLabel();
}

private void txtDbPort_TextChanged(object sender, EventArgs e)
{
_validDbSettings = false;
InvalidateDbValidationLabel();
}

private void txtDbName_TextChanged(object sender, EventArgs e)
{
_validDbSettings = false;
InvalidateDbValidationLabel();
}

private void txtDbUser_TextChanged(object sender, EventArgs e)
{
_validDbSettings = false;
InvalidateDbValidationLabel();
}

private void txtDbPass_TextChanged(object sender, EventArgs e)
{
_validDbSettings = false;
InvalidateDbValidationLabel();
}

Expand All @@ -179,13 +174,17 @@ private void btnValidateDbSettings_Click(object sender, EventArgs e)

private void InvalidateDbValidationLabel()
{
_validDbSettings = false;

tslblDbValidation.Text = @"Database Validation Required.";
tslblDbValidation.ForeColor = Color.Red;
}

private void TestDatabaseValues()
{
InvalidateDbValidationLabel();
lblDatabaseSetup.ForeColor = Color.Black;
lblDatabaseName.ForeColor = Color.Black;

int port = 3306;
try
Expand Down Expand Up @@ -216,6 +215,7 @@ private void TestDatabaseValues()

if (result != DialogResult.Yes)
{
lblDatabaseName.ForeColor = Color.Red;
return;
}
}
Expand Down

0 comments on commit ce979fb

Please sign in to comment.