diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs index 540e00ec3..dc1f83741 100644 --- a/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs +++ b/GreenshotJiraPlugin/Forms/SettingsForm.Designer.cs @@ -50,6 +50,8 @@ namespace GreenshotJiraPlugin { this.buttonCancel = new System.Windows.Forms.Button(); this.label_url = new System.Windows.Forms.Label(); this.textBoxUrl = new System.Windows.Forms.TextBox(); + this.combobox_uploadimageformat = new System.Windows.Forms.ComboBox(); + this.label_upload_format = new System.Windows.Forms.Label(); this.SuspendLayout(); // // buttonOK @@ -90,11 +92,30 @@ namespace GreenshotJiraPlugin { this.textBoxUrl.Size = new System.Drawing.Size(276, 20); this.textBoxUrl.TabIndex = 6; // + // combobox_uploadimageformat + // + this.combobox_uploadimageformat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.combobox_uploadimageformat.FormattingEnabled = true; + this.combobox_uploadimageformat.Location = new System.Drawing.Point(102, 47); + this.combobox_uploadimageformat.Name = "combobox_uploadimageformat"; + this.combobox_uploadimageformat.Size = new System.Drawing.Size(276, 21); + this.combobox_uploadimageformat.TabIndex = 8; + // + // label_upload_format + // + this.label_upload_format.Location = new System.Drawing.Point(12, 50); + this.label_upload_format.Name = "label_upload_format"; + this.label_upload_format.Size = new System.Drawing.Size(84, 20); + this.label_upload_format.TabIndex = 9; + this.label_upload_format.Text = "Upload format"; + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(387, 174); + this.Controls.Add(this.label_upload_format); + this.Controls.Add(this.combobox_uploadimageformat); this.Controls.Add(this.label_url); this.Controls.Add(this.textBoxUrl); this.Controls.Add(this.buttonCancel); @@ -104,6 +125,8 @@ namespace GreenshotJiraPlugin { this.ResumeLayout(false); this.PerformLayout(); } + private System.Windows.Forms.ComboBox combobox_uploadimageformat; + private System.Windows.Forms.Label label_upload_format; private System.Windows.Forms.TextBox textBoxUrl; private System.Windows.Forms.Label label_url; private System.Windows.Forms.Button buttonCancel; diff --git a/GreenshotJiraPlugin/Forms/SettingsForm.cs b/GreenshotJiraPlugin/Forms/SettingsForm.cs index d2f59fbd3..d718d22a9 100644 --- a/GreenshotJiraPlugin/Forms/SettingsForm.cs +++ b/GreenshotJiraPlugin/Forms/SettingsForm.cs @@ -31,12 +31,17 @@ namespace GreenshotJiraPlugin { public partial class SettingsForm : Form { private ILanguage lang = Language.GetInstance(); - public SettingsForm() { + public SettingsForm(JiraConfiguration config) { // // The InitializeComponent() call is required for Windows Forms designer support. // InitializeComponent(); InitializeTexts(); + + combobox_uploadimageformat.Items.Clear(); + foreach(OutputFormat format in Enum.GetValues(typeof(OutputFormat))) { + combobox_uploadimageformat.Items.Add(format.ToString()); + } } private void InitializeTexts() { @@ -44,6 +49,7 @@ namespace GreenshotJiraPlugin { this.buttonOK.Text = lang.GetString(LangKey.OK); this.buttonCancel.Text = lang.GetString(LangKey.CANCEL); this.Text = lang.GetString(LangKey.login_title); + this.label_upload_format.Text = lang.GetString(LangKey.label_upload_format); } public string Url { @@ -51,6 +57,11 @@ namespace GreenshotJiraPlugin { set {textBoxUrl.Text = value;} } + public string UploadFormat { + get {return combobox_uploadimageformat.Text;} + set {combobox_uploadimageformat.Text = value;} + } + void ButtonOKClick(object sender, EventArgs e) { this.DialogResult = DialogResult.OK; } diff --git a/GreenshotJiraPlugin/JiraConfiguration.cs b/GreenshotJiraPlugin/JiraConfiguration.cs index f3028db3e..eefce4485 100644 --- a/GreenshotJiraPlugin/JiraConfiguration.cs +++ b/GreenshotJiraPlugin/JiraConfiguration.cs @@ -49,12 +49,14 @@ namespace GreenshotJiraPlugin { /// /// bool true if OK was pressed, false if cancel public bool ShowConfigDialog() { - SettingsForm pwForm = new SettingsForm(); - pwForm.Url = Url; - DialogResult result = pwForm.ShowDialog(); + SettingsForm settingsForm = new SettingsForm(this); + settingsForm.Url = Url; + settingsForm.UploadFormat = UploadFormat.ToString(); + DialogResult result = settingsForm.ShowDialog(); if (result == DialogResult.OK) { - if (!pwForm.Url.Equals(Url)) { - Url = pwForm.Url; + if (!settingsForm.Url.Equals(Url) || !settingsForm.UploadFormat.Equals(UploadFormat.ToString())) { + Url = settingsForm.Url; + UploadFormat = (OutputFormat)Enum.Parse(typeof(OutputFormat), settingsForm.UploadFormat); } IniConfig.Save(); return true; diff --git a/GreenshotJiraPlugin/LanguageKeys.cs b/GreenshotJiraPlugin/LanguageKeys.cs index 73bd26538..267f16a6d 100644 --- a/GreenshotJiraPlugin/LanguageKeys.cs +++ b/GreenshotJiraPlugin/LanguageKeys.cs @@ -34,9 +34,7 @@ namespace GreenshotJiraPlugin { login_error, login_title, label_url, - label_user, - label_password, - label_no_password_store, + label_upload_format, OK, CANCEL, upload_success, diff --git a/GreenshotJiraPlugin/Languages/language_jiraplugin-de-DE.xml b/GreenshotJiraPlugin/Languages/language_jiraplugin-de-DE.xml index 5cc8fb3cd..4ac699bd7 100644 --- a/GreenshotJiraPlugin/Languages/language_jiraplugin-de-DE.xml +++ b/GreenshotJiraPlugin/Languages/language_jiraplugin-de-DE.xml @@ -37,14 +37,8 @@ Url - - Benutzer - - - Password - - - Kennwort nicht speichern + + Bildformat OK diff --git a/GreenshotJiraPlugin/Languages/language_jiraplugin-en-US.xml b/GreenshotJiraPlugin/Languages/language_jiraplugin-en-US.xml index 788c8c3f7..16d2276c1 100644 --- a/GreenshotJiraPlugin/Languages/language_jiraplugin-en-US.xml +++ b/GreenshotJiraPlugin/Languages/language_jiraplugin-en-US.xml @@ -34,14 +34,8 @@ Url - - User - - - Password - - - Do not store the password + + Upload format Please enter your Jira login data diff --git a/GreenshotJiraPlugin/Languages/language_jiraplugin-nl-NL.xml b/GreenshotJiraPlugin/Languages/language_jiraplugin-nl-NL.xml index 044acf009..aff0375d0 100644 --- a/GreenshotJiraPlugin/Languages/language_jiraplugin-nl-NL.xml +++ b/GreenshotJiraPlugin/Languages/language_jiraplugin-nl-NL.xml @@ -34,14 +34,8 @@ Url - - Gebruiker - - - Wachtwoord - - - Het wachtwoord niet opslaan + + Beeld formaat Geef uw Jira login data