From 4d4d518a2a029603bcc9ec3488c12a185999d314 Mon Sep 17 00:00:00 2001 From: emkael Date: Tue, 22 Aug 2017 20:38:50 +0200 Subject: Displaying MySQL configuration on start-up only if MySQL has not been configured, regardless of password-less accounts Fixes #14 --- Aktywator/MainForm.cs | 2 +- Aktywator/MySQL.cs | 1 + Aktywator/MysqlSettings.cs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'Aktywator') 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(); -- cgit v1.2.3