summaryrefslogtreecommitdiff
path: root/Aktywator/MysqlSettings.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Aktywator/MysqlSettings.cs')
-rw-r--r--Aktywator/MysqlSettings.cs39
1 files changed, 39 insertions, 0 deletions
diff --git a/Aktywator/MysqlSettings.cs b/Aktywator/MysqlSettings.cs
new file mode 100644
index 0000000..df2fb15
--- /dev/null
+++ b/Aktywator/MysqlSettings.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Aktywator
+{
+ public partial class MysqlSettings : Form
+ {
+ public MysqlSettings()
+ {
+ InitializeComponent();
+ }
+
+ private void MysqlSettings_Load(object sender, EventArgs e)
+ {
+ eHost.Text = Properties.Settings.Default.HOST;
+ eUser.Text = Properties.Settings.Default.USER;
+ ePass.Text = Properties.Settings.Default.PASS;
+ ePort.Text = Properties.Settings.Default.PORT;
+ }
+
+ private void button1_Click(object sender, EventArgs e)
+ {
+ Properties.Settings.Default.HOST = eHost.Text;
+ Properties.Settings.Default.USER = eUser.Text;
+ Properties.Settings.Default.PASS = ePass.Text;
+ Properties.Settings.Default.PORT = ePort.Text;
+ Properties.Settings.Default.Save();
+
+ string msg = MySQL.test();
+ if (msg == "") Close();
+ else MessageBox.Show(msg, "Nieprawidłowe ustawienia", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+ }
+ }
+}