summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-08-22 20:38:50 +0200
committeremkael <emkael@tlen.pl>2017-08-22 20:41:56 +0200
commit4d4d518a2a029603bcc9ec3488c12a185999d314 (patch)
treedfbd2e431b099b2c440610172d9fafe10332f2b8
parentc94ddd514fb44f50c82cad8f8684d72805522bb6 (diff)
Displaying MySQL configuration on start-up only if MySQL has not been configured, regardless of password-less accounts
Fixes #14
-rw-r--r--Aktywator/MainForm.cs2
-rw-r--r--Aktywator/MySQL.cs1
-rw-r--r--Aktywator/MysqlSettings.cs1
3 files changed, 3 insertions, 1 deletions
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index 85ec29f..25268b6 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -31,7 +31,7 @@ namespace Aktywator
private void MainForm_Load(object sender, EventArgs e)
{
- if (MySQL.getPass() == "") (new MysqlSettings()).ShowDialog();
+ if (!MySQL.getConfigured()) (new MysqlSettings()).ShowDialog();
}
private void MainForm_Shown(object sender, EventArgs e)
diff --git a/Aktywator/MySQL.cs b/Aktywator/MySQL.cs
index 29b90b5..a4d19c2 100644
--- a/Aktywator/MySQL.cs
+++ b/Aktywator/MySQL.cs
@@ -86,5 +86,6 @@ namespace Aktywator
public static string getUser() { return Properties.Settings.Default.USER; }
public static string getPass() { return Properties.Settings.Default.PASS; }
public static string getPort() { return Properties.Settings.Default.PORT; }
+ public static bool getConfigured() { return Properties.Settings.Default.CONFIGURED; }
}
}
diff --git a/Aktywator/MysqlSettings.cs b/Aktywator/MysqlSettings.cs
index df2fb15..ac46470 100644
--- a/Aktywator/MysqlSettings.cs
+++ b/Aktywator/MysqlSettings.cs
@@ -29,6 +29,7 @@ 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();