diff options
author | emkael <emkael@tlen.pl> | 2017-08-22 20:41:09 +0200 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-08-22 20:42:05 +0200 |
commit | 59197aac15252d8d2afdbb12c3893b880fa4a107 (patch) | |
tree | 876bbedb9f93bec5d30971b97dff013d9ffd7c45 | |
parent | 4d4d518a2a029603bcc9ec3488c12a185999d314 (diff) |
Save settings and mark them as set only if the settings actually work
-rw-r--r-- | Aktywator/MysqlSettings.cs | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Aktywator/MysqlSettings.cs b/Aktywator/MysqlSettings.cs index ac46470..c6f1b8c 100644 --- a/Aktywator/MysqlSettings.cs +++ b/Aktywator/MysqlSettings.cs @@ -29,12 +29,18 @@ namespace Aktywator Properties.Settings.Default.USER = eUser.Text; Properties.Settings.Default.PASS = ePass.Text; Properties.Settings.Default.PORT = ePort.Text; - Properties.Settings.Default.CONFIGURED = true; - Properties.Settings.Default.Save(); string msg = MySQL.test(); - if (msg == "") Close(); - else MessageBox.Show(msg, "Nieprawidłowe ustawienia", MessageBoxButtons.OK, MessageBoxIcon.Stop); + if (msg == "") + { + Properties.Settings.Default.CONFIGURED = true; + Properties.Settings.Default.Save(); + Close(); + } + else + { + MessageBox.Show(msg, "Nieprawidłowe ustawienia", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } } } } |