diff --git a/Translations/ColoredPassword.de.language.xml b/Translations/ColoredPassword.de.language.xml index bdaf929..c95a4c9 100644 --- a/Translations/ColoredPassword.de.language.xml +++ b/Translations/ColoredPassword.de.language.xml @@ -1,6 +1,10 @@ - 5 + + 6 Active Aktiv @@ -41,4 +45,8 @@ ColorPwGenDisplay Passwörter farbig anzeigen + + SyncColors + Synchronisiere Farben + \ No newline at end of file diff --git a/Translations/ColoredPassword.template.language.xml b/Translations/ColoredPassword.template.language.xml index dea6e18..d99fa38 100644 --- a/Translations/ColoredPassword.template.language.xml +++ b/Translations/ColoredPassword.template.language.xml @@ -1,5 +1,9 @@ + 0 Active @@ -41,4 +45,8 @@ ColorPwGenDisplay Color passwords in password generator + + SyncColors + Snychronize font colors + \ No newline at end of file diff --git a/src/ColoredPassword.cs b/src/ColoredPassword.cs index 9c03520..4f29120 100644 --- a/src/ColoredPassword.cs +++ b/src/ColoredPassword.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using System.Drawing; +using System.Reflection; using System.Windows.Forms; using KeePass.App.Configuration; using KeePass.Plugins; @@ -229,10 +230,70 @@ private void OnWindowAdded(object sender, GwmWindowEventArgs e) { if (e.Form is KeePass.Forms.KeyPromptForm) e.Form.Shown += OnKeyPromptFormShown; else if (e.Form is KeePass.Forms.PwGeneratorForm) e.Form.Shown += OnPwGeneratorFormShown; + else if (e.Form is KeePass.Forms.PrintForm && Tools.KeePassVersion >= ColorConfig.KP_2_51) e.Form.Shown += OnPrintFormShown; } - //Color passwords in password generator - private void OnPwGeneratorFormShown(object sender, EventArgs e) + private void OnPrintFormShown(object sender, EventArgs e) + { + var fPrint = sender as KeePass.Forms.PrintForm; + if (fPrint == null) return; + fPrint.Shown -= OnPrintFormShown; + if (!ColorConfig.Active) return; + if (!ColorConfig.SyncColorsWithPrintForm) return; + fPrint.FormClosed += OnPrintFormClosed; + //Adjust ColorButtonEx + Button cbe = Tools.GetControl("m_btnColorPU", fPrint) as Button; + if (cbe != null) SetColorButtonColor(cbe, ColorConfig.ForeColorDefault); + cbe = Tools.GetControl("m_btnColorPL", sender as Form) as Button; + if (cbe != null) + { + if (ColorConfig.LowercaseDifferent) SetColorButtonColor(cbe, ColorConfig.ForeColorLower); + else SetColorButtonColor(cbe, ColorConfig.ForeColorDefault); + } + cbe = Tools.GetControl("m_btnColorPD", sender as Form) as Button; + if (cbe != null) SetColorButtonColor(cbe, ColorConfig.ForeColorDigit); + cbe = Tools.GetControl("m_btnColorPO", sender as Form) as Button; + if (cbe != null) SetColorButtonColor(cbe, ColorConfig.ForeColorSpecial); + + var mUpdateWebBrowser = fPrint.GetType().GetMethod("UpdateWebBrowser", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public); + if (mUpdateWebBrowser != null) mUpdateWebBrowser.Invoke(fPrint, new object[] { false }); + } + + private void OnPrintFormClosed(object sender, FormClosedEventArgs e) + { + var fPrint = sender as KeePass.Forms.PrintForm; + if (fPrint == null) return; + fPrint.FormClosed -= OnPrintFormClosed; + if (fPrint.DialogResult != DialogResult.OK) return; + + Button cbe = Tools.GetControl("m_btnColorPU", fPrint) as Button; + if (cbe != null) ColorConfig.ForeColorDefault = GetColorButtonColor(cbe, ColorConfig.ForeColorDefault); + cbe = Tools.GetControl("m_btnColorPL", sender as Form) as Button; + if (cbe != null) ColorConfig.ForeColorLower = GetColorButtonColor(cbe, ColorConfig.ForeColorLower); + cbe = Tools.GetControl("m_btnColorPD", sender as Form) as Button; + if (cbe != null) ColorConfig.ForeColorDigit = GetColorButtonColor(cbe, ColorConfig.ForeColorDigit); + cbe = Tools.GetControl("m_btnColorPO", sender as Form) as Button; + if (cbe != null) ColorConfig.ForeColorSpecial = GetColorButtonColor(cbe, ColorConfig.ForeColorSpecial); + } + + private Color GetColorButtonColor(Button cbe, Color cDefault) + { + var pColor = cbe.GetType().GetProperty("SelectedColor"); + if (pColor == null) return cDefault; + object o = pColor.GetValue(cbe, null); + if (!(o is Color)) return cDefault; + return (Color)o; + } + + private void SetColorButtonColor(Button bPU, Color cTextcolor) + { + var pColor = bPU.GetType().GetProperty("SelectedColor"); + if (pColor == null) return; + pColor.SetValue(bPU, cTextcolor, null); + } + + //Color passwords in password generator + private void OnPwGeneratorFormShown(object sender, EventArgs e) { (sender as Form).Shown -= OnPwGeneratorFormShown; if (!ColorConfig.Active) return; @@ -310,6 +371,7 @@ private void OptionsForm_Shown(object sender, EventArgs e) o.bBackColorLower.BackColor = ColorConfig.BackColorLower; o.cbColorEntryView.Checked = ColorConfig.ColorEntryView; o.cbColorEntryViewKeepBackgroundColor.Checked = ColorConfig.ListViewKeepBackgroundColor; + o.cbSyncColorsWithPrintForm.Checked = ColorConfig.SyncColorsWithPrintForm; o.cbSinglePwDisplay.Checked = ColorConfig.SinglePwDisplayActive; o.cbColorPwGen.Checked = ColorConfig.ColorPwGen; o.ctbExample.ColorText(); @@ -338,6 +400,7 @@ private void OptionsClosed(object sender, Tools.OptionsFormsEventArgs e) ColorConfig.ColorEntryView = o.cbColorEntryView.Checked; ColorConfig.ListViewKeepBackgroundColor = o.cbColorEntryViewKeepBackgroundColor.Checked; + ColorConfig.SyncColorsWithPrintForm = o.cbSyncColorsWithPrintForm.Checked; SinglePwDisplay.Enabled = ColorConfig.SinglePwDisplayActive = o.cbSinglePwDisplay.Checked; ColorConfig.ColorPwGen = o.cbColorPwGen.Checked; ColorConfig.Write(); diff --git a/src/Options.Designer.cs b/src/Options.Designer.cs index f8d312f..5c72c3d 100644 --- a/src/Options.Designer.cs +++ b/src/Options.Designer.cs @@ -28,377 +28,436 @@ protected override void Dispose(bool disposing) /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); - this.cdSelect = new System.Windows.Forms.ColorDialog(); - this.colorDialog1 = new System.Windows.Forms.ColorDialog(); - this.gExample = new System.Windows.Forms.GroupBox(); - this.ctbExample = new ColoredPassword.ColorTextBox(); - this.pError = new System.Windows.Forms.Panel(); - this.lError2 = new System.Windows.Forms.Label(); - this.lError = new System.Windows.Forms.Label(); - this.tabControl1 = new System.Windows.Forms.TabControl(); - this.tpSettings = new System.Windows.Forms.TabPage(); - this.cgActive = new RookieUI.CheckedGroupBox(); - this.lDefault = new System.Windows.Forms.Label(); - this.bForeColorDefault = new System.Windows.Forms.Button(); - this.bBackColorDefault = new System.Windows.Forms.Button(); - this.cbLowercase = new System.Windows.Forms.CheckBox(); - this.bForeColorLower = new System.Windows.Forms.Button(); - this.bBackColorLower = new System.Windows.Forms.Button(); - this.lDigits = new System.Windows.Forms.Label(); - this.bForeColorDigit = new System.Windows.Forms.Button(); - this.bBackColorDigit = new System.Windows.Forms.Button(); - this.lSpecial = new System.Windows.Forms.Label(); - this.bForeColorSpecial = new System.Windows.Forms.Button(); - this.bBackColorSpecial = new System.Windows.Forms.Button(); - this.tpAdvanced = new System.Windows.Forms.TabPage(); - this.gPasswordGenerator = new System.Windows.Forms.GroupBox(); - this.cbColorPwGen = new System.Windows.Forms.CheckBox(); - this.gEntryView = new System.Windows.Forms.GroupBox(); - this.cbSinglePwDisplay = new System.Windows.Forms.CheckBox(); - this.cbColorEntryViewKeepBackgroundColor = new System.Windows.Forms.CheckBox(); - this.cbColorEntryView = new System.Windows.Forms.CheckBox(); - this.gExample.SuspendLayout(); - this.pError.SuspendLayout(); - this.tabControl1.SuspendLayout(); - this.tpSettings.SuspendLayout(); - this.cgActive.SuspendLayout(); - this.tpAdvanced.SuspendLayout(); - this.gPasswordGenerator.SuspendLayout(); - this.gEntryView.SuspendLayout(); - this.SuspendLayout(); - // - // gExample - // - this.gExample.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.components = new System.ComponentModel.Container(); + this.cdSelect = new System.Windows.Forms.ColorDialog(); + this.colorDialog1 = new System.Windows.Forms.ColorDialog(); + this.gExample = new System.Windows.Forms.GroupBox(); + this.ctbExample = new ColoredPassword.ColorTextBox(); + this.pError = new System.Windows.Forms.Panel(); + this.lError2 = new System.Windows.Forms.Label(); + this.lError = new System.Windows.Forms.Label(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tpSettings = new System.Windows.Forms.TabPage(); + this.cgActive = new RookieUI.CheckedGroupBox(); + this.lDefault = new System.Windows.Forms.Label(); + this.bForeColorDefault = new System.Windows.Forms.Button(); + this.bBackColorDefault = new System.Windows.Forms.Button(); + this.cbLowercase = new System.Windows.Forms.CheckBox(); + this.bForeColorLower = new System.Windows.Forms.Button(); + this.bBackColorLower = new System.Windows.Forms.Button(); + this.lDigits = new System.Windows.Forms.Label(); + this.bForeColorDigit = new System.Windows.Forms.Button(); + this.bBackColorDigit = new System.Windows.Forms.Button(); + this.lSpecial = new System.Windows.Forms.Label(); + this.bForeColorSpecial = new System.Windows.Forms.Button(); + this.bBackColorSpecial = new System.Windows.Forms.Button(); + this.tpAdvanced = new System.Windows.Forms.TabPage(); + this.gPasswordGenerator = new System.Windows.Forms.GroupBox(); + this.cbColorPwGen = new System.Windows.Forms.CheckBox(); + this.gEntryView = new System.Windows.Forms.GroupBox(); + this.cbSinglePwDisplay = new System.Windows.Forms.CheckBox(); + this.cbColorEntryViewKeepBackgroundColor = new System.Windows.Forms.CheckBox(); + this.cbColorEntryView = new System.Windows.Forms.CheckBox(); + this.gSyncColorsWithPrintForm = new System.Windows.Forms.GroupBox(); + this.cbSyncColorsWithPrintForm = new System.Windows.Forms.CheckBox(); + this.gExample.SuspendLayout(); + this.pError.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tpSettings.SuspendLayout(); + this.cgActive.SuspendLayout(); + this.tpAdvanced.SuspendLayout(); + this.gPasswordGenerator.SuspendLayout(); + this.gEntryView.SuspendLayout(); + this.gSyncColorsWithPrintForm.SuspendLayout(); + this.SuspendLayout(); + // + // gExample + // + this.gExample.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.gExample.AutoSize = true; - this.gExample.Controls.Add(this.ctbExample); - this.gExample.Location = new System.Drawing.Point(3, 203); - this.gExample.Name = "gExample"; - this.gExample.Padding = new System.Windows.Forms.Padding(0); - this.gExample.Size = new System.Drawing.Size(803, 73); - this.gExample.TabIndex = 4; - this.gExample.TabStop = false; - this.gExample.Text = "gExample"; - // - // ctbExample - // - this.ctbExample.Location = new System.Drawing.Point(10, 28); - this.ctbExample.Margin = new System.Windows.Forms.Padding(0); - this.ctbExample.Multiline = false; - this.ctbExample.Name = "ctbExample"; - this.ctbExample.Size = new System.Drawing.Size(300, 26); - this.ctbExample.TabIndex = 1; - this.ctbExample.Text = "ABC123!\"@abc"; - // - // pError - // - this.pError.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + this.gExample.AutoSize = true; + this.gExample.Controls.Add(this.ctbExample); + this.gExample.Location = new System.Drawing.Point(5, 315); + this.gExample.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.gExample.Name = "gExample"; + this.gExample.Padding = new System.Windows.Forms.Padding(0); + this.gExample.Size = new System.Drawing.Size(1428, 132); + this.gExample.TabIndex = 4; + this.gExample.TabStop = false; + this.gExample.Text = "gExample"; + // + // ctbExample + // + this.ctbExample.ColorBackground = true; + this.ctbExample.Location = new System.Drawing.Point(18, 43); + this.ctbExample.Margin = new System.Windows.Forms.Padding(0); + this.ctbExample.Multiline = false; + this.ctbExample.Name = "ctbExample"; + this.ctbExample.Size = new System.Drawing.Size(530, 38); + this.ctbExample.TabIndex = 1; + this.ctbExample.Text = "ABC123!\"@abc"; + // + // pError + // + this.pError.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); - this.pError.AutoSize = true; - this.pError.BackColor = System.Drawing.Color.Transparent; - this.pError.Controls.Add(this.lError2); - this.pError.Controls.Add(this.lError); - this.pError.Location = new System.Drawing.Point(3, 276); - this.pError.Name = "pError"; - this.pError.Padding = new System.Windows.Forms.Padding(10, 5, 10, 5); - this.pError.Size = new System.Drawing.Size(803, 50); - this.pError.TabIndex = 5; - // - // lError2 - // - this.lError2.AutoEllipsis = true; - this.lError2.AutoSize = true; - this.lError2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lError2.ForeColor = System.Drawing.Color.Red; - this.lError2.Location = new System.Drawing.Point(10, 25); - this.lError2.Name = "lError2"; - this.lError2.Size = new System.Drawing.Size(59, 20); - this.lError2.TabIndex = 9; - this.lError2.Text = "Error2"; - // - // lError - // - this.lError.AutoEllipsis = true; - this.lError.AutoSize = true; - this.lError.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.lError.ForeColor = System.Drawing.Color.Red; - this.lError.Location = new System.Drawing.Point(10, 5); - this.lError.Name = "lError"; - this.lError.Size = new System.Drawing.Size(49, 20); - this.lError.TabIndex = 8; - this.lError.Text = "Error"; - // - // tabControl1 - // - this.tabControl1.Controls.Add(this.tpSettings); - this.tabControl1.Controls.Add(this.tpAdvanced); - this.tabControl1.Location = new System.Drawing.Point(0, 0); - this.tabControl1.Name = "tabControl1"; - this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(817, 400); - this.tabControl1.TabIndex = 6; - // - // tpSettings - // - this.tpSettings.Controls.Add(this.pError); - this.tpSettings.Controls.Add(this.gExample); - this.tpSettings.Controls.Add(this.cgActive); - this.tpSettings.Location = new System.Drawing.Point(4, 29); - this.tpSettings.Name = "tpSettings"; - this.tpSettings.Padding = new System.Windows.Forms.Padding(3); - this.tpSettings.Size = new System.Drawing.Size(809, 367); - this.tpSettings.TabIndex = 0; - this.tpSettings.Text = "Settings"; - this.tpSettings.UseVisualStyleBackColor = true; - // - // cgActive - // - this.cgActive.CheckboxOffset = new System.Drawing.Point(6, 0); - this.cgActive.Checked = true; - this.cgActive.Controls.Add(this.lDefault); - this.cgActive.Controls.Add(this.bForeColorDefault); - this.cgActive.Controls.Add(this.bBackColorDefault); - this.cgActive.Controls.Add(this.cbLowercase); - this.cgActive.Controls.Add(this.bForeColorLower); - this.cgActive.Controls.Add(this.bBackColorLower); - this.cgActive.Controls.Add(this.lDigits); - this.cgActive.Controls.Add(this.bForeColorDigit); - this.cgActive.Controls.Add(this.bBackColorDigit); - this.cgActive.Controls.Add(this.lSpecial); - this.cgActive.Controls.Add(this.bForeColorSpecial); - this.cgActive.Controls.Add(this.bBackColorSpecial); - this.cgActive.Location = new System.Drawing.Point(3, 3); - this.cgActive.Name = "cgActive"; - this.cgActive.Size = new System.Drawing.Size(803, 200); - this.cgActive.TabIndex = 0; - this.cgActive.Text = "cgActive"; - this.cgActive.CheckedChanged += new System.EventHandler(this.cgActive_CheckedChanged); - // - // lDefault - // - this.lDefault.AutoSize = true; - this.lDefault.Location = new System.Drawing.Point(10, 29); - this.lDefault.Name = "lDefault"; - this.lDefault.Size = new System.Drawing.Size(61, 20); - this.lDefault.TabIndex = 23; - this.lDefault.Text = "Default"; - // - // bForeColorDefault - // - this.bForeColorDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bForeColorDefault.Location = new System.Drawing.Point(560, 22); - this.bForeColorDefault.Name = "bForeColorDefault"; - this.bForeColorDefault.Size = new System.Drawing.Size(38, 34); - this.bForeColorDefault.TabIndex = 15; - this.bForeColorDefault.Text = "button1"; - this.bForeColorDefault.UseVisualStyleBackColor = true; - this.bForeColorDefault.Click += new System.EventHandler(this.OnColorSelect); - // - // bBackColorDefault - // - this.bBackColorDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bBackColorDefault.Location = new System.Drawing.Point(708, 22); - this.bBackColorDefault.Name = "bBackColorDefault"; - this.bBackColorDefault.Size = new System.Drawing.Size(38, 34); - this.bBackColorDefault.TabIndex = 17; - this.bBackColorDefault.Text = "button2"; - this.bBackColorDefault.UseVisualStyleBackColor = true; - this.bBackColorDefault.Click += new System.EventHandler(this.OnColorSelect); - // - // cbLowercase - // - this.cbLowercase.AutoSize = true; - this.cbLowercase.Location = new System.Drawing.Point(37, 67); - this.cbLowercase.Margin = new System.Windows.Forms.Padding(30, 3, 3, 3); - this.cbLowercase.Name = "cbLowercase"; - this.cbLowercase.Size = new System.Drawing.Size(112, 24); - this.cbLowercase.TabIndex = 24; - this.cbLowercase.Text = "Lowercase"; - this.cbLowercase.CheckedChanged += new System.EventHandler(this.cbLowercase_CheckedChanged); - // - // bForeColorLower - // - this.bForeColorLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bForeColorLower.Location = new System.Drawing.Point(560, 62); - this.bForeColorLower.Name = "bForeColorLower"; - this.bForeColorLower.Size = new System.Drawing.Size(38, 34); - this.bForeColorLower.TabIndex = 16; - this.bForeColorLower.Text = "button1"; - this.bForeColorLower.UseVisualStyleBackColor = true; - this.bForeColorLower.Click += new System.EventHandler(this.OnColorSelect); - // - // bBackColorLower - // - this.bBackColorLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bBackColorLower.Location = new System.Drawing.Point(708, 62); - this.bBackColorLower.Name = "bBackColorLower"; - this.bBackColorLower.Size = new System.Drawing.Size(38, 34); - this.bBackColorLower.TabIndex = 18; - this.bBackColorLower.Text = "button2"; - this.bBackColorLower.UseVisualStyleBackColor = true; - this.bBackColorLower.Click += new System.EventHandler(this.OnColorSelect); - // - // lDigits - // - this.lDigits.AutoSize = true; - this.lDigits.Location = new System.Drawing.Point(10, 109); - this.lDigits.Name = "lDigits"; - this.lDigits.Size = new System.Drawing.Size(49, 20); - this.lDigits.TabIndex = 13; - this.lDigits.Text = "Digits"; - // - // bForeColorDigit - // - this.bForeColorDigit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bForeColorDigit.Location = new System.Drawing.Point(560, 102); - this.bForeColorDigit.Name = "bForeColorDigit"; - this.bForeColorDigit.Size = new System.Drawing.Size(38, 34); - this.bForeColorDigit.TabIndex = 19; - this.bForeColorDigit.Text = "button1"; - this.bForeColorDigit.UseVisualStyleBackColor = true; - this.bForeColorDigit.Click += new System.EventHandler(this.OnColorSelect); - // - // bBackColorDigit - // - this.bBackColorDigit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bBackColorDigit.Location = new System.Drawing.Point(708, 102); - this.bBackColorDigit.Name = "bBackColorDigit"; - this.bBackColorDigit.Size = new System.Drawing.Size(38, 34); - this.bBackColorDigit.TabIndex = 20; - this.bBackColorDigit.Text = "button2"; - this.bBackColorDigit.UseVisualStyleBackColor = true; - this.bBackColorDigit.Click += new System.EventHandler(this.OnColorSelect); - // - // lSpecial - // - this.lSpecial.AutoSize = true; - this.lSpecial.Location = new System.Drawing.Point(10, 149); - this.lSpecial.Name = "lSpecial"; - this.lSpecial.Size = new System.Drawing.Size(61, 20); - this.lSpecial.TabIndex = 14; - this.lSpecial.Text = "Special"; - // - // bForeColorSpecial - // - this.bForeColorSpecial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bForeColorSpecial.Location = new System.Drawing.Point(560, 142); - this.bForeColorSpecial.Name = "bForeColorSpecial"; - this.bForeColorSpecial.Size = new System.Drawing.Size(38, 34); - this.bForeColorSpecial.TabIndex = 21; - this.bForeColorSpecial.Text = "button3"; - this.bForeColorSpecial.UseVisualStyleBackColor = true; - this.bForeColorSpecial.Click += new System.EventHandler(this.OnColorSelect); - // - // bBackColorSpecial - // - this.bBackColorSpecial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); - this.bBackColorSpecial.Location = new System.Drawing.Point(708, 142); - this.bBackColorSpecial.Name = "bBackColorSpecial"; - this.bBackColorSpecial.Size = new System.Drawing.Size(38, 34); - this.bBackColorSpecial.TabIndex = 22; - this.bBackColorSpecial.Text = "button4"; - this.bBackColorSpecial.UseVisualStyleBackColor = true; - this.bBackColorSpecial.Click += new System.EventHandler(this.OnColorSelect); - // - // tpAdvanced - // - this.tpAdvanced.Controls.Add(this.gPasswordGenerator); - this.tpAdvanced.Controls.Add(this.gEntryView); - this.tpAdvanced.Location = new System.Drawing.Point(4, 29); - this.tpAdvanced.Name = "tpAdvanced"; - this.tpAdvanced.Padding = new System.Windows.Forms.Padding(3); - this.tpAdvanced.Size = new System.Drawing.Size(809, 367); - this.tpAdvanced.TabIndex = 1; - this.tpAdvanced.Text = "Advanced"; - this.tpAdvanced.UseVisualStyleBackColor = true; - // - // gPasswordGenerator - // - this.gPasswordGenerator.Controls.Add(this.cbColorPwGen); - this.gPasswordGenerator.Location = new System.Drawing.Point(3, 106); - this.gPasswordGenerator.Name = "gPasswordGenerator"; - this.gPasswordGenerator.Size = new System.Drawing.Size(803, 55); - this.gPasswordGenerator.TabIndex = 6; - this.gPasswordGenerator.TabStop = false; - this.gPasswordGenerator.Text = "Password Generator"; - // - // cbColorPwGen - // - this.cbColorPwGen.AutoSize = true; - this.cbColorPwGen.Location = new System.Drawing.Point(10, 22); - this.cbColorPwGen.Name = "cbColorPwGen"; - this.cbColorPwGen.Size = new System.Drawing.Size(271, 24); - this.cbColorPwGen.TabIndex = 5; - this.cbColorPwGen.Text = "Use colors in password generator"; - this.cbColorPwGen.UseVisualStyleBackColor = true; - // - // gEntryView - // - this.gEntryView.Controls.Add(this.cbSinglePwDisplay); - this.gEntryView.Controls.Add(this.cbColorEntryViewKeepBackgroundColor); - this.gEntryView.Controls.Add(this.cbColorEntryView); - this.gEntryView.Location = new System.Drawing.Point(3, 3); - this.gEntryView.Name = "gEntryView"; - this.gEntryView.Size = new System.Drawing.Size(803, 103); - this.gEntryView.TabIndex = 5; - this.gEntryView.TabStop = false; - this.gEntryView.Text = "Entry list"; - // - // cbSinglePwDisplay - // - this.cbSinglePwDisplay.AutoSize = true; - this.cbSinglePwDisplay.Location = new System.Drawing.Point(10, 70); - this.cbSinglePwDisplay.Name = "cbSinglePwDisplay"; - this.cbSinglePwDisplay.Size = new System.Drawing.Size(244, 24); - this.cbSinglePwDisplay.TabIndex = 6; - this.cbSinglePwDisplay.Text = "Single click password to show"; - this.cbSinglePwDisplay.UseVisualStyleBackColor = true; - // - // cbColorEntryViewKeepBackgroundColor - // - this.cbColorEntryViewKeepBackgroundColor.AutoSize = true; - this.cbColorEntryViewKeepBackgroundColor.Location = new System.Drawing.Point(10, 46); - this.cbColorEntryViewKeepBackgroundColor.Name = "cbColorEntryViewKeepBackgroundColor"; - this.cbColorEntryViewKeepBackgroundColor.Size = new System.Drawing.Size(271, 24); - this.cbColorEntryViewKeepBackgroundColor.TabIndex = 4; - this.cbColorEntryViewKeepBackgroundColor.Text = "Keep entry view background color"; - this.cbColorEntryViewKeepBackgroundColor.UseVisualStyleBackColor = true; - // - // cbColorEntryView - // - this.cbColorEntryView.AutoSize = true; - this.cbColorEntryView.Location = new System.Drawing.Point(10, 22); - this.cbColorEntryView.Name = "cbColorEntryView"; - this.cbColorEntryView.Size = new System.Drawing.Size(145, 24); - this.cbColorEntryView.TabIndex = 5; - this.cbColorEntryView.Text = "Color entry view"; - this.cbColorEntryView.UseVisualStyleBackColor = true; - // - // Options - // - this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.AutoScroll = true; - this.Controls.Add(this.tabControl1); - this.Name = "Options"; - this.Size = new System.Drawing.Size(817, 447); - this.Resize += new System.EventHandler(this.Options_Resize); - this.gExample.ResumeLayout(false); - this.pError.ResumeLayout(false); - this.pError.PerformLayout(); - this.tabControl1.ResumeLayout(false); - this.tpSettings.ResumeLayout(false); - this.tpSettings.PerformLayout(); - this.cgActive.ResumeLayout(false); - this.cgActive.PerformLayout(); - this.tpAdvanced.ResumeLayout(false); - this.gPasswordGenerator.ResumeLayout(false); - this.gPasswordGenerator.PerformLayout(); - this.gEntryView.ResumeLayout(false); - this.gEntryView.PerformLayout(); - this.ResumeLayout(false); + this.pError.AutoSize = true; + this.pError.BackColor = System.Drawing.Color.Transparent; + this.pError.Controls.Add(this.lError2); + this.pError.Controls.Add(this.lError); + this.pError.Location = new System.Drawing.Point(5, 428); + this.pError.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.pError.Name = "pError"; + this.pError.Padding = new System.Windows.Forms.Padding(18, 8, 18, 8); + this.pError.Size = new System.Drawing.Size(1428, 95); + this.pError.TabIndex = 5; + // + // lError2 + // + this.lError2.AutoEllipsis = true; + this.lError2.AutoSize = true; + this.lError2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lError2.ForeColor = System.Drawing.Color.Red; + this.lError2.Location = new System.Drawing.Point(18, 39); + this.lError2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.lError2.Name = "lError2"; + this.lError2.Size = new System.Drawing.Size(95, 31); + this.lError2.TabIndex = 9; + this.lError2.Text = "Error2"; + // + // lError + // + this.lError.AutoEllipsis = true; + this.lError.AutoSize = true; + this.lError.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lError.ForeColor = System.Drawing.Color.Red; + this.lError.Location = new System.Drawing.Point(18, 8); + this.lError.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.lError.Name = "lError"; + this.lError.Size = new System.Drawing.Size(79, 31); + this.lError.TabIndex = 8; + this.lError.Text = "Error"; + // + // tabControl1 + // + this.tabControl1.Controls.Add(this.tpSettings); + this.tabControl1.Controls.Add(this.tpAdvanced); + this.tabControl1.Location = new System.Drawing.Point(0, 0); + this.tabControl1.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tabControl1.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(1452, 620); + this.tabControl1.TabIndex = 6; + // + // tpSettings + // + this.tpSettings.Controls.Add(this.pError); + this.tpSettings.Controls.Add(this.gExample); + this.tpSettings.Controls.Add(this.cgActive); + this.tpSettings.Location = new System.Drawing.Point(10, 48); + this.tpSettings.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tpSettings.Name = "tpSettings"; + this.tpSettings.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tpSettings.Size = new System.Drawing.Size(1432, 562); + this.tpSettings.TabIndex = 0; + this.tpSettings.Text = "Settings"; + this.tpSettings.UseVisualStyleBackColor = true; + // + // cgActive + // + this.cgActive.CheckboxOffset = new System.Drawing.Point(6, 0); + this.cgActive.Checked = true; + this.cgActive.Controls.Add(this.lDefault); + this.cgActive.Controls.Add(this.bForeColorDefault); + this.cgActive.Controls.Add(this.bBackColorDefault); + this.cgActive.Controls.Add(this.cbLowercase); + this.cgActive.Controls.Add(this.bForeColorLower); + this.cgActive.Controls.Add(this.bBackColorLower); + this.cgActive.Controls.Add(this.lDigits); + this.cgActive.Controls.Add(this.bForeColorDigit); + this.cgActive.Controls.Add(this.bBackColorDigit); + this.cgActive.Controls.Add(this.lSpecial); + this.cgActive.Controls.Add(this.bForeColorSpecial); + this.cgActive.Controls.Add(this.bBackColorSpecial); + this.cgActive.Location = new System.Drawing.Point(5, 5); + this.cgActive.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cgActive.Name = "cgActive"; + this.cgActive.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cgActive.Size = new System.Drawing.Size(1428, 310); + this.cgActive.TabIndex = 0; + this.cgActive.Text = "cgActive"; + this.cgActive.CheckedChanged += new System.EventHandler(this.cgActive_CheckedChanged); + // + // lDefault + // + this.lDefault.AutoSize = true; + this.lDefault.Location = new System.Drawing.Point(18, 45); + this.lDefault.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.lDefault.Name = "lDefault"; + this.lDefault.Size = new System.Drawing.Size(106, 32); + this.lDefault.TabIndex = 23; + this.lDefault.Text = "Default"; + // + // bForeColorDefault + // + this.bForeColorDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bForeColorDefault.Location = new System.Drawing.Point(996, 34); + this.bForeColorDefault.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bForeColorDefault.Name = "bForeColorDefault"; + this.bForeColorDefault.Size = new System.Drawing.Size(68, 53); + this.bForeColorDefault.TabIndex = 15; + this.bForeColorDefault.Text = "button1"; + this.bForeColorDefault.UseVisualStyleBackColor = true; + this.bForeColorDefault.Click += new System.EventHandler(this.OnColorSelect); + // + // bBackColorDefault + // + this.bBackColorDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bBackColorDefault.Location = new System.Drawing.Point(1259, 34); + this.bBackColorDefault.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bBackColorDefault.Name = "bBackColorDefault"; + this.bBackColorDefault.Size = new System.Drawing.Size(68, 53); + this.bBackColorDefault.TabIndex = 17; + this.bBackColorDefault.Text = "button2"; + this.bBackColorDefault.UseVisualStyleBackColor = true; + this.bBackColorDefault.Click += new System.EventHandler(this.OnColorSelect); + // + // cbLowercase + // + this.cbLowercase.AutoSize = true; + this.cbLowercase.Location = new System.Drawing.Point(66, 104); + this.cbLowercase.Margin = new System.Windows.Forms.Padding(53, 5, 5, 5); + this.cbLowercase.Name = "cbLowercase"; + this.cbLowercase.Size = new System.Drawing.Size(190, 36); + this.cbLowercase.TabIndex = 24; + this.cbLowercase.Text = "Lowercase"; + this.cbLowercase.CheckedChanged += new System.EventHandler(this.cbLowercase_CheckedChanged); + // + // bForeColorLower + // + this.bForeColorLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bForeColorLower.Location = new System.Drawing.Point(996, 96); + this.bForeColorLower.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bForeColorLower.Name = "bForeColorLower"; + this.bForeColorLower.Size = new System.Drawing.Size(68, 53); + this.bForeColorLower.TabIndex = 16; + this.bForeColorLower.Text = "button1"; + this.bForeColorLower.UseVisualStyleBackColor = true; + this.bForeColorLower.Click += new System.EventHandler(this.OnColorSelect); + // + // bBackColorLower + // + this.bBackColorLower.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bBackColorLower.Location = new System.Drawing.Point(1259, 96); + this.bBackColorLower.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bBackColorLower.Name = "bBackColorLower"; + this.bBackColorLower.Size = new System.Drawing.Size(68, 53); + this.bBackColorLower.TabIndex = 18; + this.bBackColorLower.Text = "button2"; + this.bBackColorLower.UseVisualStyleBackColor = true; + this.bBackColorLower.Click += new System.EventHandler(this.OnColorSelect); + // + // lDigits + // + this.lDigits.AutoSize = true; + this.lDigits.Location = new System.Drawing.Point(18, 169); + this.lDigits.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.lDigits.Name = "lDigits"; + this.lDigits.Size = new System.Drawing.Size(87, 32); + this.lDigits.TabIndex = 13; + this.lDigits.Text = "Digits"; + // + // bForeColorDigit + // + this.bForeColorDigit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bForeColorDigit.Location = new System.Drawing.Point(996, 158); + this.bForeColorDigit.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bForeColorDigit.Name = "bForeColorDigit"; + this.bForeColorDigit.Size = new System.Drawing.Size(68, 53); + this.bForeColorDigit.TabIndex = 19; + this.bForeColorDigit.Text = "button1"; + this.bForeColorDigit.UseVisualStyleBackColor = true; + this.bForeColorDigit.Click += new System.EventHandler(this.OnColorSelect); + // + // bBackColorDigit + // + this.bBackColorDigit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bBackColorDigit.Location = new System.Drawing.Point(1259, 158); + this.bBackColorDigit.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bBackColorDigit.Name = "bBackColorDigit"; + this.bBackColorDigit.Size = new System.Drawing.Size(68, 53); + this.bBackColorDigit.TabIndex = 20; + this.bBackColorDigit.Text = "button2"; + this.bBackColorDigit.UseVisualStyleBackColor = true; + this.bBackColorDigit.Click += new System.EventHandler(this.OnColorSelect); + // + // lSpecial + // + this.lSpecial.AutoSize = true; + this.lSpecial.Location = new System.Drawing.Point(18, 231); + this.lSpecial.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0); + this.lSpecial.Name = "lSpecial"; + this.lSpecial.Size = new System.Drawing.Size(110, 32); + this.lSpecial.TabIndex = 14; + this.lSpecial.Text = "Special"; + // + // bForeColorSpecial + // + this.bForeColorSpecial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bForeColorSpecial.Location = new System.Drawing.Point(996, 220); + this.bForeColorSpecial.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bForeColorSpecial.Name = "bForeColorSpecial"; + this.bForeColorSpecial.Size = new System.Drawing.Size(68, 53); + this.bForeColorSpecial.TabIndex = 21; + this.bForeColorSpecial.Text = "button3"; + this.bForeColorSpecial.UseVisualStyleBackColor = true; + this.bForeColorSpecial.Click += new System.EventHandler(this.OnColorSelect); + // + // bBackColorSpecial + // + this.bBackColorSpecial.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.bBackColorSpecial.Location = new System.Drawing.Point(1259, 220); + this.bBackColorSpecial.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.bBackColorSpecial.Name = "bBackColorSpecial"; + this.bBackColorSpecial.Size = new System.Drawing.Size(68, 53); + this.bBackColorSpecial.TabIndex = 22; + this.bBackColorSpecial.Text = "button4"; + this.bBackColorSpecial.UseVisualStyleBackColor = true; + this.bBackColorSpecial.Click += new System.EventHandler(this.OnColorSelect); + // + // tpAdvanced + // + this.tpAdvanced.Controls.Add(this.gSyncColorsWithPrintForm); + this.tpAdvanced.Controls.Add(this.gPasswordGenerator); + this.tpAdvanced.Controls.Add(this.gEntryView); + this.tpAdvanced.Location = new System.Drawing.Point(10, 48); + this.tpAdvanced.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tpAdvanced.Name = "tpAdvanced"; + this.tpAdvanced.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.tpAdvanced.Size = new System.Drawing.Size(1432, 562); + this.tpAdvanced.TabIndex = 1; + this.tpAdvanced.Text = "Advanced"; + this.tpAdvanced.UseVisualStyleBackColor = true; + // + // gPasswordGenerator + // + this.gPasswordGenerator.Controls.Add(this.cbColorPwGen); + this.gPasswordGenerator.Location = new System.Drawing.Point(5, 165); + this.gPasswordGenerator.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.gPasswordGenerator.Name = "gPasswordGenerator"; + this.gPasswordGenerator.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.gPasswordGenerator.Size = new System.Drawing.Size(1428, 85); + this.gPasswordGenerator.TabIndex = 6; + this.gPasswordGenerator.TabStop = false; + this.gPasswordGenerator.Text = "Password Generator"; + // + // cbColorPwGen + // + this.cbColorPwGen.AutoSize = true; + this.cbColorPwGen.Location = new System.Drawing.Point(18, 34); + this.cbColorPwGen.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cbColorPwGen.Name = "cbColorPwGen"; + this.cbColorPwGen.Size = new System.Drawing.Size(473, 36); + this.cbColorPwGen.TabIndex = 5; + this.cbColorPwGen.Text = "Use colors in password generator"; + this.cbColorPwGen.UseVisualStyleBackColor = true; + // + // gEntryView + // + this.gEntryView.Controls.Add(this.cbSinglePwDisplay); + this.gEntryView.Controls.Add(this.cbColorEntryViewKeepBackgroundColor); + this.gEntryView.Controls.Add(this.cbColorEntryView); + this.gEntryView.Location = new System.Drawing.Point(5, 5); + this.gEntryView.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.gEntryView.Name = "gEntryView"; + this.gEntryView.Padding = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.gEntryView.Size = new System.Drawing.Size(1428, 160); + this.gEntryView.TabIndex = 5; + this.gEntryView.TabStop = false; + this.gEntryView.Text = "Entry list"; + // + // cbSinglePwDisplay + // + this.cbSinglePwDisplay.AutoSize = true; + this.cbSinglePwDisplay.Location = new System.Drawing.Point(18, 108); + this.cbSinglePwDisplay.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cbSinglePwDisplay.Name = "cbSinglePwDisplay"; + this.cbSinglePwDisplay.Size = new System.Drawing.Size(429, 36); + this.cbSinglePwDisplay.TabIndex = 6; + this.cbSinglePwDisplay.Text = "Single click password to show"; + this.cbSinglePwDisplay.UseVisualStyleBackColor = true; + // + // cbColorEntryViewKeepBackgroundColor + // + this.cbColorEntryViewKeepBackgroundColor.AutoSize = true; + this.cbColorEntryViewKeepBackgroundColor.Location = new System.Drawing.Point(18, 71); + this.cbColorEntryViewKeepBackgroundColor.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cbColorEntryViewKeepBackgroundColor.Name = "cbColorEntryViewKeepBackgroundColor"; + this.cbColorEntryViewKeepBackgroundColor.Size = new System.Drawing.Size(479, 36); + this.cbColorEntryViewKeepBackgroundColor.TabIndex = 4; + this.cbColorEntryViewKeepBackgroundColor.Text = "Keep entry view background color"; + this.cbColorEntryViewKeepBackgroundColor.UseVisualStyleBackColor = true; + // + // cbColorEntryView + // + this.cbColorEntryView.AutoSize = true; + this.cbColorEntryView.Location = new System.Drawing.Point(18, 34); + this.cbColorEntryView.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.cbColorEntryView.Name = "cbColorEntryView"; + this.cbColorEntryView.Size = new System.Drawing.Size(255, 36); + this.cbColorEntryView.TabIndex = 5; + this.cbColorEntryView.Text = "Color entry view"; + this.cbColorEntryView.UseVisualStyleBackColor = true; + // + // gSyncColorsWithPrintForm + // + this.gSyncColorsWithPrintForm.Controls.Add(this.cbSyncColorsWithPrintForm); + this.gSyncColorsWithPrintForm.Location = new System.Drawing.Point(5, 250); + this.gSyncColorsWithPrintForm.Margin = new System.Windows.Forms.Padding(5); + this.gSyncColorsWithPrintForm.Name = "gSyncColorsWithPrintForm"; + this.gSyncColorsWithPrintForm.Padding = new System.Windows.Forms.Padding(5); + this.gSyncColorsWithPrintForm.Size = new System.Drawing.Size(1428, 85); + this.gSyncColorsWithPrintForm.TabIndex = 7; + this.gSyncColorsWithPrintForm.TabStop = false; + this.gSyncColorsWithPrintForm.Text = "Sync with print form"; + // + // cbSyncColorsWithPrintForm + // + this.cbSyncColorsWithPrintForm.AutoSize = true; + this.cbSyncColorsWithPrintForm.Location = new System.Drawing.Point(18, 34); + this.cbSyncColorsWithPrintForm.Margin = new System.Windows.Forms.Padding(5); + this.cbSyncColorsWithPrintForm.Name = "cbSyncColorsWithPrintForm"; + this.cbSyncColorsWithPrintForm.Size = new System.Drawing.Size(300, 36); + this.cbSyncColorsWithPrintForm.TabIndex = 5; + this.cbSyncColorsWithPrintForm.Text = "Sync with print form"; + this.cbSyncColorsWithPrintForm.UseVisualStyleBackColor = true; + // + // Options + // + this.AutoScaleDimensions = new System.Drawing.SizeF(16F, 31F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; + this.Controls.Add(this.tabControl1); + this.Margin = new System.Windows.Forms.Padding(5, 5, 5, 5); + this.Name = "Options"; + this.Size = new System.Drawing.Size(1452, 693); + this.Resize += new System.EventHandler(this.Options_Resize); + this.gExample.ResumeLayout(false); + this.pError.ResumeLayout(false); + this.pError.PerformLayout(); + this.tabControl1.ResumeLayout(false); + this.tpSettings.ResumeLayout(false); + this.tpSettings.PerformLayout(); + this.cgActive.ResumeLayout(false); + this.cgActive.PerformLayout(); + this.tpAdvanced.ResumeLayout(false); + this.gPasswordGenerator.ResumeLayout(false); + this.gPasswordGenerator.PerformLayout(); + this.gEntryView.ResumeLayout(false); + this.gEntryView.PerformLayout(); + this.gSyncColorsWithPrintForm.ResumeLayout(false); + this.gSyncColorsWithPrintForm.PerformLayout(); + this.ResumeLayout(false); } #endregion @@ -432,5 +491,7 @@ private void InitializeComponent() private System.Windows.Forms.Label lSpecial; internal System.Windows.Forms.Button bForeColorSpecial; internal System.Windows.Forms.Button bBackColorSpecial; - } + private System.Windows.Forms.GroupBox gSyncColorsWithPrintForm; + internal System.Windows.Forms.CheckBox cbSyncColorsWithPrintForm; + } } diff --git a/src/Options.cs b/src/Options.cs index 76dbeae..e263430 100644 --- a/src/Options.cs +++ b/src/Options.cs @@ -43,6 +43,9 @@ public Options() cbColorPwGen.Text = PluginTranslate.ColorPwGenDisplay; var f = KeePass.Program.Translation.Forms.Find(x => x.FullName == "KeePass.Forms.PwGeneratorForm"); if (f != null && f.Window != null) gPasswordGenerator.Text = f.Window.Text; + + gSyncColorsWithPrintForm.Text = KeePass.Resources.KPRes.Print; + cbSyncColorsWithPrintForm.Text = PluginTranslate.SyncColors; } private void OnColorSelect(object sender, EventArgs e) @@ -78,6 +81,7 @@ private void cbLowercase_CheckedChanged(object sender, EventArgs e) private void cgActive_CheckedChanged(object sender, RookieUI.CheckedGroupCheckEventArgs e) { foreach (Control c in tpAdvanced.Controls) c.Enabled = cgActive.Checked; + if (PluginTools.Tools.KeePassVersion < ColorConfig.KP_2_51) gSyncColorsWithPrintForm.Enabled = false; } } } diff --git a/src/PluginTranslation.cs b/src/PluginTranslation.cs index df4ab05..1910244 100644 --- a/src/PluginTranslation.cs +++ b/src/PluginTranslation.cs @@ -73,6 +73,10 @@ public static class PluginTranslate /// Color passwords in password generator /// public static readonly string ColorPwGenDisplay = @"Color passwords in password generator"; + /// + /// Snychronize font colors + /// + public static readonly string SyncColors = @"Snychronize font colors"; #endregion #region NO changes in this area diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 2eb8bba..c609128 100644 --- a/src/Properties/AssemblyInfo.cs +++ b/src/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, // indem Sie "*" wie unten gezeigt eingeben: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.13.2")] -[assembly: AssemblyFileVersion("0.13.2")] +[assembly: AssemblyVersion("0.14")] +[assembly: AssemblyFileVersion("0.14")] diff --git a/src/Util.cs b/src/Util.cs index 6aeafb3..86d4e52 100644 --- a/src/Util.cs +++ b/src/Util.cs @@ -16,6 +16,14 @@ internal static class ColorConfig public static bool ColorEntryView = true; public static bool SinglePwDisplayActive = true; public static bool ColorPwGen = true; + + public static Version KP_2_51 = new Version(2, 51); + + public static bool SyncColorsWithPrintForm + { + get { return m_Config.GetBool("ColoredPassword.SyncColorsWithPrintForm", true); } + set { m_Config.SetBool("ColoredPassword.SyncColorsWithPrintForm", value); } + } public static bool Testmode { get { return m_Testmode; } diff --git a/version.info b/version.info index ba45ef5..797df30 100644 --- a/version.info +++ b/version.info @@ -1,6 +1,6 @@ : -ColoredPassword:0.13.2 -ColoredPassword!de:5 +ColoredPassword:0.14 +ColoredPassword!de:6 ColoredPassword!pl:2 ColoredPassword!pt:1 ColoredPassword!ru:2