summaryrefslogtreecommitdiff
path: root/Aktywator/MysqlSettings.cs
diff options
context:
space:
mode:
authorMichal Zimniewicz <mzimniew@man.poznan.pl>2015-01-28 10:49:16 +0100
committerMichal Zimniewicz <mzimniew@man.poznan.pl>2015-01-28 10:58:38 +0100
commit29d9771333f9f996208b0e3dbce95dd80cddf8e9 (patch)
tree7160accad1184eabc2dbfadf4175aeeb6abf82dc /Aktywator/MysqlSettings.cs
parenta331533373a95820a89aa93fead351ceb9a30046 (diff)
initial commit with unreleased version 1.0.4
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);
+ }
+ }
+}