From 29d9771333f9f996208b0e3dbce95dd80cddf8e9 Mon Sep 17 00:00:00 2001 From: Michal Zimniewicz Date: Wed, 28 Jan 2015 10:49:16 +0100 Subject: initial commit with unreleased version 1.0.4 --- Aktywator/MysqlSettings.cs | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Aktywator/MysqlSettings.cs (limited to 'Aktywator/MysqlSettings.cs') 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); + } + } +} -- cgit v1.2.3