Ejemplo n.º 1
0
 //Show error message if TypeOverride is not possible
 private void OnKeyPromptFormShown(object sender, EventArgs e)
 {
     if (OverridePossible || !ColorConfig.FirstRun || !ColorConfig.Active)
     {
         return;
     }
     (sender as Form).Shown -= OnKeyPromptFormShown;
     Tools.ShowError(string.Format(PluginTranslate.Error, typeof(SecureTextBoxEx).BaseType.Name));
     ColorConfig.FirstRun = false;
     ColorConfig.Write();
 }
Ejemplo n.º 2
0
        private void OptionsClosed(object sender, Tools.OptionsFormsEventArgs e)
        {
            ColorConfig.Testmode = false;
            if (e.form.DialogResult != DialogResult.OK)
            {
                return;
            }
            bool    shown;
            Options o = (Options)Tools.GetPluginFromOptions(this, out shown);

            PluginDebug.AddInfo("Plugin options window closed, plugin options shown: " + shown.ToString(), 0);
            if (!shown)
            {
                return;
            }
            ColorPasswords(false);
            ColorConfig.Active             = o.cgActive.Checked;
            ColorConfig.ForeColorDefault   = o.bForeColorDefault.BackColor;
            ColorConfig.BackColorDefault   = o.bBackColorDefault.BackColor;
            ColorConfig.ForeColorDigit     = o.bForeColorDigit.BackColor;
            ColorConfig.BackColorDigit     = o.bBackColorDigit.BackColor;
            ColorConfig.ForeColorSpecial   = o.bForeColorSpecial.BackColor;
            ColorConfig.BackColorSpecial   = o.bBackColorSpecial.BackColor;
            ColorConfig.LowercaseDifferent = o.cbLowercase.Checked;
            ColorConfig.ForeColorLower     = o.bForeColorLower.BackColor;
            ColorConfig.BackColorLower     = o.bBackColorLower.BackColor;

            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();
            if (ColorConfig.Active)
            {
                ColorPasswords(ColorConfig.Active);
            }
        }