diff --git a/KeePassRPC/Forms/KeeFieldForm.cs b/KeePassRPC/Forms/KeeFieldForm.cs index 3f92476..ad3b226 100644 --- a/KeePassRPC/Forms/KeeFieldForm.cs +++ b/KeePassRPC/Forms/KeeFieldForm.cs @@ -35,18 +35,17 @@ public KeeFieldForm(string name, string value, string id, FormFieldType type, in if (value == "{USERNAME}") { textBox2.Text = Value = value; - comboBox1.Text = "Username"; + comboBox1.Text = "Text"; + comboBox1.Tag = "username"; comboBox1.Enabled = false; label6.Visible = true; - } else - if (value == "{PASSWORD}") + } else if (value == "{PASSWORD}") { textBox2.Text = Value = value; comboBox1.Text = "Password"; comboBox1.Enabled = false; label7.Visible = true; - } - else + } else { if (type == FormFieldType.FFTpassword) comboBox1.Text = "Password"; @@ -57,7 +56,11 @@ public KeeFieldForm(string name, string value, string id, FormFieldType type, in else if (type == FormFieldType.FFTtext) comboBox1.Text = "Text"; else if (type == FormFieldType.FFTusername) - comboBox1.Text = "Username"; + { + // Shouldn't happen but gives a way out if old bad data is present + comboBox1.Text = "Text"; + comboBox1.Tag = "username"; + } else if (type == FormFieldType.FFTcheckbox) comboBox1.Text = "Checkbox"; @@ -114,7 +117,9 @@ private void button1_Click(object sender, EventArgs e) else if (comboBox1.Text == "Radio") Type = FormFieldType.FFTradio; else if (comboBox1.Text == "Text") - Type = FormFieldType.FFTtext; + { + Type = (string)comboBox1.Tag == "username" ? FormFieldType.FFTusername : FormFieldType.FFTtext; + } else if (comboBox1.Text == "Username") Type = FormFieldType.FFTusername; else if (comboBox1.Text == "Checkbox") diff --git a/KeePassRPC/KeePassRPCExt.cs b/KeePassRPC/KeePassRPCExt.cs index a6019c7..71155fa 100644 --- a/KeePassRPC/KeePassRPCExt.cs +++ b/KeePassRPC/KeePassRPCExt.cs @@ -33,7 +33,7 @@ namespace KeePassRPC public sealed class KeePassRPCExt : Plugin { // version information - public static readonly Version PluginVersion = new Version(1, 15, 1); + public static readonly Version PluginVersion = new Version(1, 16, 0); public override string UpdateUrl { diff --git a/KeePassRPC/Properties/AssemblyInfo.cs b/KeePassRPC/Properties/AssemblyInfo.cs index 67e080c..1f7a1e1 100644 --- a/KeePassRPC/Properties/AssemblyInfo.cs +++ b/KeePassRPC/Properties/AssemblyInfo.cs @@ -19,4 +19,4 @@ // Assembly version information [assembly: AssemblyVersion("2.0.48.*")] -[assembly: AssemblyFileVersion("1.15.1.0")] // also change PluginVersion in KeePassRPCExt.cs! +[assembly: AssemblyFileVersion("1.16.0.0")] // also change PluginVersion in KeePassRPCExt.cs!