From 0d651be1c9e4b7cb049ccdb56a133e1e98131f31 Mon Sep 17 00:00:00 2001 From: emkael Date: Fri, 16 Nov 2018 20:00:42 +0100 Subject: Moving S3 bucket settings to other S3 settings --- spedytor/Form1.cs | 6 ------ spedytor/MysqlSettings.cs | 9 ++++----- spedytor/Properties/S3Settings.Designer.cs | 12 ++++++++++++ spedytor/Properties/S3Settings.settings | 9 ++++++--- spedytor/Properties/Settings.Designer.cs | 12 ------------ spedytor/Properties/Settings.settings | 3 --- spedytor/app.config | 16 ++++++++++++---- spedytor/s3.config | 8 -------- 8 files changed, 34 insertions(+), 41 deletions(-) delete mode 100644 spedytor/s3.config diff --git a/spedytor/Form1.cs b/spedytor/Form1.cs index 6533a0f..f6370b1 100644 --- a/spedytor/Form1.cs +++ b/spedytor/Form1.cs @@ -36,7 +36,6 @@ namespace spedytor if (!MySQL.getConfigured()) (new MysqlSettings()).ShowDialog(); if (!MySQL.getConfigured()) this.Dispose(); this.refreshDatabaseList(); - this.tBucketID.Text = Properties.Settings.Default.S3_BUCKET; this.checkS3Options(); } @@ -113,10 +112,5 @@ namespace spedytor } } - private void Form1_FormClosing(object sender, FormClosingEventArgs e) - { - Properties.Settings.Default.S3_BUCKET = this.tBucketID.Text; - Properties.Settings.Default.Save(); - } } } diff --git a/spedytor/MysqlSettings.cs b/spedytor/MysqlSettings.cs index 89b6515..a07dc46 100644 --- a/spedytor/MysqlSettings.cs +++ b/spedytor/MysqlSettings.cs @@ -27,13 +27,12 @@ namespace spedytor private void button1_Click(object sender, EventArgs e) { - Properties.Settings.Default.HOST = eHost.Text; - Properties.Settings.Default.USER = eUser.Text; + Properties.Settings.Default.HOST = eHost.Text.Trim(); + Properties.Settings.Default.USER = eUser.Text.Trim(); Properties.Settings.Default.PASS = ePass.Text; Properties.Settings.Default.PORT = ePort.Text; - Properties.S3Settings.Default.AWS_ACCESS_KEY = eS3ID.Text; - Properties.S3Settings.Default.AWS_SECRET_KEY = eS3Key.Text; - Properties.S3Settings.Default.Save(); + Properties.S3Settings.Default.AWS_ACCESS_KEY = eS3ID.Text.Trim(); + Properties.S3Settings.Default.AWS_SECRET_KEY = eS3Key.Text.Trim(); string msg = MySQL.test(); if (msg == "") diff --git a/spedytor/Properties/S3Settings.Designer.cs b/spedytor/Properties/S3Settings.Designer.cs index 4eafd4c..72e0b92 100644 --- a/spedytor/Properties/S3Settings.Designer.cs +++ b/spedytor/Properties/S3Settings.Designer.cs @@ -46,5 +46,17 @@ namespace spedytor.Properties { this["AWS_SECRET_KEY"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string AWS_BUCKET_ID { + get { + return ((string)(this["AWS_BUCKET_ID"])); + } + set { + this["AWS_BUCKET_ID"] = value; + } + } } } diff --git a/spedytor/Properties/S3Settings.settings b/spedytor/Properties/S3Settings.settings index fa43a0d..cc44c1a 100644 --- a/spedytor/Properties/S3Settings.settings +++ b/spedytor/Properties/S3Settings.settings @@ -1,12 +1,15 @@  - + - + - + + + + diff --git a/spedytor/Properties/Settings.Designer.cs b/spedytor/Properties/Settings.Designer.cs index 52df391..9508165 100644 --- a/spedytor/Properties/Settings.Designer.cs +++ b/spedytor/Properties/Settings.Designer.cs @@ -82,17 +82,5 @@ namespace spedytor.Properties { this["CONFIGURED"] = value; } } - - [global::System.Configuration.UserScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("")] - public string S3_BUCKET { - get { - return ((string)(this["S3_BUCKET"])); - } - set { - this["S3_BUCKET"] = value; - } - } } } diff --git a/spedytor/Properties/Settings.settings b/spedytor/Properties/Settings.settings index df8332a..503268a 100644 --- a/spedytor/Properties/Settings.settings +++ b/spedytor/Properties/Settings.settings @@ -17,8 +17,5 @@ False - - - \ No newline at end of file diff --git a/spedytor/app.config b/spedytor/app.config index ee6fa55..b8ef5b0 100644 --- a/spedytor/app.config +++ b/spedytor/app.config @@ -2,12 +2,23 @@ +
- + + + + + + + + + + + localhost @@ -24,9 +35,6 @@ False - - - diff --git a/spedytor/s3.config b/spedytor/s3.config deleted file mode 100644 index 5cd7ba5..0000000 --- a/spedytor/s3.config +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - -- cgit v1.2.3