diff --git a/src/Config/LockAssistConfig_SL.cs b/src/Config/LockAssistConfig_SL.cs index a569d49..2f6e7b7 100644 --- a/src/Config/LockAssistConfig_SL.cs +++ b/src/Config/LockAssistConfig_SL.cs @@ -51,20 +51,48 @@ public static bool SL_OnMinimize set { _config.SetBool(LockAssistSoftlockOnMinimize, value); } } + private static List m_SL_DefaultExcludeForms = new List() {"AboutForm","AutoTypeCtxForm","CharPickerForm","ColumnsForm", + "HelpSourceForm","KeyPromptForm","LanguageForm","PluginsForm","PwGeneratorForm","UpdateCheckForm", "OtpKeyProv.Forms.OtpKeyPromptForm" }; + private const string mc_ExcludeFormsText = "Enter form names to exclude from Softlock"; public static List SL_ExcludeForms { get { - string sForms = _config.GetString(LockAssistSoftlockExcludeForms, "AboutForm,AutoTypeCtxForm,CharPickerForm,ColumnsForm," + - "HelpSourceForm,KeyPromptForm,LanguageForm,PluginsForm,PwGeneratorForm,UpdateCheckForm"); - var aForms = sForms.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + //Set defaults List lForms = new List(); + lForms.AddRange(m_SL_DefaultExcludeForms); + + string sForms = _config.GetString(LockAssistSoftlockExcludeForms, string.Empty); + if (string.IsNullOrEmpty(sForms)) + { + sForms = string.Empty; + SL_ExcludeForms = new List() { mc_ExcludeFormsText }; + } + var aForms = sForms.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); foreach (var sForm in aForms) { + if (sForm == mc_ExcludeFormsText) continue; + if (sForm.Trim().StartsWith("-")) continue; if (!lForms.Contains(sForm.Trim())) lForms.Add(sForm.Trim()); } + foreach (var sForm in aForms) + { + if (sForm == mc_ExcludeFormsText) continue; + if (!sForm.Trim().StartsWith("-")) continue; + lForms.Remove(sForm.Trim().Substring(1)); + } return lForms; } + set + { + string sForms = string.Empty; + foreach (var s in value) + { + if (!string.IsNullOrEmpty(sForms)) sForms += ","; + sForms += s; + } + _config.SetString(LockAssistSoftlockExcludeForms, sForms); + } } } } diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs index 10985cf..3749f41 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("3.3.1")] -[assembly: AssemblyFileVersion("3.3.1")] +[assembly: AssemblyVersion("3.4")] +[assembly: AssemblyFileVersion("3.4")] diff --git a/version.info b/version.info index c2e9750..c7a5248 100644 --- a/version.info +++ b/version.info @@ -1,5 +1,5 @@ : -LockAssist:3.3.1 +LockAssist:3.4 LockAssist!de:5 LockAssist!pt:4 :