private void LoadPolicyOptions() { m_cdxPolicy = new CheckedLVItemDXList(m_lvPolicy, true); LoadPolicyOption("Plugins", KPRes.Plugins, KPRes.PolicyPluginsDesc); LoadPolicyOption("Export", KPRes.Export, KPRes.PolicyExportDesc); LoadPolicyOption("ExportNoKey", KPRes.Export + " - " + KPRes.NoKeyRepeat, KPRes.PolicyExportNoKeyDesc); LoadPolicyOption("Import", KPRes.Import, KPRes.PolicyImportDesc); LoadPolicyOption("Print", KPRes.Print, KPRes.PolicyPrintDesc); LoadPolicyOption("PrintNoKey", KPRes.Print + " - " + KPRes.NoKeyRepeat, KPRes.PolicyPrintNoKeyDesc); LoadPolicyOption("NewFile", KPRes.NewDatabase, KPRes.PolicyNewDatabaseDesc); LoadPolicyOption("SaveFile", KPRes.SaveDatabase, KPRes.PolicySaveDatabaseDesc); LoadPolicyOption("AutoType", KPRes.AutoType, KPRes.PolicyAutoTypeDesc); LoadPolicyOption("AutoTypeWithoutContext", KPRes.AutoType + " - " + KPRes.WithoutContext, KPRes.PolicyAutoTypeWithoutContextDesc); LoadPolicyOption("CopyToClipboard", KPRes.Copy, KPRes.PolicyClipboardDesc); LoadPolicyOption("CopyWholeEntries", KPRes.CopyWholeEntries, KPRes.PolicyCopyWholeEntriesDesc); LoadPolicyOption("DragDrop", KPRes.DragDrop, KPRes.PolicyDragDropDesc); LoadPolicyOption("UnhidePasswords", KPRes.UnhidePasswords, KPRes.UnhidePasswordsDesc); LoadPolicyOption("ChangeMasterKey", KPRes.ChangeMasterKey, KPRes.PolicyChangeMasterKey); LoadPolicyOption("ChangeMasterKeyNoKey", KPRes.ChangeMasterKey + " - " + KPRes.NoKeyRepeat, KPRes.PolicyChangeMasterKeyNoKeyDesc); LoadPolicyOption("EditTriggers", KPRes.TriggersEdit, KPRes.PolicyTriggersEditDesc); m_cdxPolicy.UpdateData(false); }
private void LoadSecurityOptions() { AceWorkspaceLocking aceWL = Program.Config.Security.WorkspaceLocking; uint uLockTime = aceWL.LockAfterTime; bool bLockTime = (uLockTime > 0); m_numLockAfterTime.Value = (bLockTime ? uLockTime : 300); m_cbLockAfterTime.Checked = bLockTime; if(AppConfigEx.IsOptionEnforced(aceWL, "LockAfterTime")) m_cbLockAfterTime.Enabled = false; uLockTime = aceWL.LockAfterGlobalTime; bLockTime = (uLockTime > 0); m_numLockAfterGlobalTime.Value = (bLockTime ? uLockTime : 240); m_cbLockAfterGlobalTime.Checked = bLockTime; if(AppConfigEx.IsOptionEnforced(aceWL, "LockAfterGlobalTime")) m_cbLockAfterGlobalTime.Enabled = false; int nDefaultExpireDays = Program.Config.Defaults.NewEntryExpiresInDays; if(nDefaultExpireDays < 0) m_cbDefaultExpireDays.Checked = false; else { m_cbDefaultExpireDays.Checked = true; try { m_numDefaultExpireDays.Value = nDefaultExpireDays; } catch(Exception) { Debug.Assert(false); } } if(AppConfigEx.IsOptionEnforced(Program.Config.Defaults, "NewEntryExpiresInDays")) m_cbDefaultExpireDays.Enabled = false; int nClipClear = Program.Config.Security.ClipboardClearAfterSeconds; if(nClipClear >= 0) { m_cbClipClearTime.Checked = true; m_numClipClearTime.Value = nClipClear; } else m_cbClipClearTime.Checked = false; if(AppConfigEx.IsOptionEnforced(Program.Config.Security, "ClipboardClearAfterSeconds")) m_cbClipClearTime.Enabled = false; m_lvSecurityOptions.Columns.Add(string.Empty, 200); // Resize below ListViewGroup lvg = new ListViewGroup(KPRes.Options); m_lvSecurityOptions.Groups.Add(lvg); Debug.Assert(lvg.ListView == m_lvSecurityOptions); m_cdxSecurityOptions = new CheckedLVItemDXList(m_lvSecurityOptions, true); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnWindowMinimize", lvg, KPRes.LockOnMinimize); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnSessionSwitch", lvg, KPRes.LockOnSessionSwitch); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnSuspend", lvg, KPRes.LockOnSuspend); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnRemoteControlChange", lvg, KPRes.LockOnRemoteControlChange); m_cdxSecurityOptions.CreateItem(aceWL, "ExitInsteadOfLockingAfterTime", lvg, KPRes.ExitInsteadOfLockingAfterTime); m_cdxSecurityOptions.CreateItem(aceWL, "AlwaysExitInsteadOfLocking", lvg, KPRes.ExitInsteadOfLockingAlways); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "ClipboardClearOnExit", lvg, KPRes.ClipboardClearOnExit); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "UseClipboardViewerIgnoreFormat", lvg, KPRes.ClipboardViewerIgnoreFormat + " " + KPRes.NotRecommended); if(NativeLib.IsLibraryInstalled()) m_cdxSecurityOptions.CreateItem(Program.Config.Native, "NativeKeyTransformations", lvg, KPRes.NativeLibUse); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "MasterKeyOnSecureDesktop", lvg, KPRes.MasterKeyOnSecureDesktop); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "ClearKeyCommandLineParams", lvg, KPRes.ClearKeyCmdLineParams); m_cdxSecurityOptions.UpdateData(false); m_lvSecurityOptions.Columns[0].Width = m_lvSecurityOptions.ClientRectangle.Width - UIUtil.GetVScrollBarWidth() - 1; }
private void LoadGuiOptions() { m_bInitialTsRenderer = Program.Config.UI.UseCustomToolStripRenderer; m_lvGuiOptions.Columns.Add(KPRes.Options, 200); // Resize below ListViewGroup lvg = new ListViewGroup(KPRes.MainWindow); m_lvGuiOptions.Groups.Add(lvg); Debug.Assert(lvg.ListView == m_lvGuiOptions); m_cdxGuiOptions = new CheckedLVItemDXList(m_lvGuiOptions, true); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "CloseButtonMinimizesWindow", lvg, KPRes.CloseButtonMinimizes); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeToTray", lvg, KPRes.MinimizeToTray); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "ShowOnlyIfTrayed", lvg, KPRes.ShowTrayOnlyIfTrayed); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowFullPathInTitle", lvg, KPRes.ShowFullPathInTitleBar); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "DropToBackAfterClipboardCopy", lvg, KPRes.DropToBackOnCopy); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterClipboardCopy", lvg, KPRes.MinimizeAfterCopy); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterLocking", lvg, KPRes.MinimizeAfterLocking); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterOpeningDatabase", lvg, KPRes.MinimizeAfterOpeningDatabase); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "DisableSaveIfNotModified", lvg, KPRes.DisableSaveIfNotModified); lvg = new ListViewGroup(KPRes.EntryList); m_lvGuiOptions.Groups.Add(lvg); // m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowGridLines", // m_lvGuiOptions, lvg, KPRes.ShowGridLines); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EntryListAutoResizeColumns", lvg, KPRes.EntryListAutoResizeColumns); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EntryListAlternatingBgColors", lvg, KPRes.AlternatingBgColors); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "CopyUrlsInsteadOfOpening", lvg, KPRes.CopyUrlsInsteadOfOpening); if(!Program.Config.MainWindow.EntryListShowDerefData) { Debug.Assert(!Program.Config.MainWindow.EntryListShowDerefDataAsync); Program.Config.MainWindow.EntryListShowDerefDataAsync = false; } ListViewItem lviDeref = m_cdxGuiOptions.CreateItem( Program.Config.MainWindow, "EntryListShowDerefData", lvg, KPRes.ShowDerefData + " (" + KPRes.Slow + ")"); ListViewItem lviDerefAsync = m_cdxGuiOptions.CreateItem( Program.Config.MainWindow, "EntryListShowDerefDataAsync", lvg, KPRes.ShowDerefDataAsync + " (" + KPRes.IncompatibleWithSorting + ")"); m_cdxGuiOptions.AddLink(lviDeref, lviDerefAsync, CheckItemLinkType.UncheckedUnchecked); m_cdxGuiOptions.AddLink(lviDerefAsync, lviDeref, CheckItemLinkType.CheckedChecked); // lvg = new ListViewGroup(KPRes.EntryView); // m_lvGuiOptions.Groups.Add(lvg); // m_cdxGuiOptions.CreateItem(Program.Config.MainWindow.EntryView, "HideProtectedCustomStrings", // lvg, KPRes.EntryViewHideProtectedCustomStrings); lvg = new ListViewGroup(KPRes.QuickSearchTb); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindSearchInPasswords", lvg, KPRes.QuickSearchInPwFields); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindExcludeExpired", lvg, KPRes.QuickSearchExclExpired); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindDerefData", lvg, KPRes.QuickSearchDerefData + " (" + KPRes.Slow + ")"); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusResultsAfterQuickFind", lvg, KPRes.FocusResultsAfterQuickSearch); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusQuickFindOnRestore", lvg, KPRes.FocusQuickFindOnRestore); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusQuickFindOnUntray", lvg, KPRes.FocusQuickFindOnUntray); lvg = new ListViewGroup(KPRes.Advanced); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.UI, "RepeatPasswordOnlyWhenHidden", lvg, KPRes.RepeatOnlyWhenHidden); m_cdxGuiOptions.CreateItem(Program.Config.UI, "UseCustomToolStripRenderer", lvg, KPRes.UseCustomToolStripRenderer); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ForceSystemFontUnix", lvg, KPRes.ForceSystemFontUnix); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ShowDbMntncResultsDialog", lvg, KPRes.DbMntncResults); m_cdxGuiOptions.UpdateData(false); m_lvGuiOptions.Columns[0].Width = m_lvGuiOptions.ClientRectangle.Width - UIUtil.GetVScrollBarWidth() - 1; try { m_numMruCount.Value = Program.Config.Application.MostRecentlyUsed.MaxItemCount; } catch(Exception) { Debug.Assert(false); m_numMruCount.Value = AceMru.DefaultMaxItemCount; } if(AppConfigEx.IsOptionEnforced(Program.Config.Application.MostRecentlyUsed, "MaxItemCount")) { m_lblMruCount.Enabled = false; m_numMruCount.Enabled = false; } if(AppConfigEx.IsOptionEnforced(Program.Config.UI, "StandardFont")) m_btnSelFont.Enabled = false; if(AppConfigEx.IsOptionEnforced(Program.Config.UI, "PasswordFont")) m_btnSelPwFont.Enabled = false; }
private void LoadAdvancedOptions() { m_lvAdvanced.Columns.Add(string.Empty, 200); // Resize below m_cdxAdvanced = new CheckedLVItemDXList(m_lvAdvanced, true); ListViewGroup lvg = new ListViewGroup(KPRes.StartAndExit); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "OpenLastFile", lvg, KPRes.AutoRememberOpenLastFile); m_cdxAdvanced.CreateItem(Program.Config.Integration, "LimitToSingleInstance", lvg, KPRes.LimitSingleInstance); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "CheckForUpdate", lvg, KPRes.CheckForUpdAtStart); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "MinimizedAndLocked", lvg, KPRes.StartMinimizedAndLocked); m_cdxAdvanced.CreateItem(Program.Config.Application.FileClosing, "AutoSave", lvg, KPRes.AutoSaveAtExit); lvg = new ListViewGroup(KPRes.AfterDatabaseOpen); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowExpiredEntries", lvg, KPRes.AutoShowExpiredEntries); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowSoonToExpireEntries", lvg, KPRes.AutoShowSoonToExpireEntries); lvg = new ListViewGroup(KPRes.AutoType); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByTitle", lvg, KPRes.AutoTypeMatchByTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByUrlInTitle", lvg, KPRes.AutoTypeMatchByUrlInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByUrlHostInTitle", lvg, KPRes.AutoTypeMatchByUrlHostInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByTagInTitle", lvg, KPRes.AutoTypeMatchByTagInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypePrependInitSequenceForIE", lvg, KPRes.AutoTypePrependInitSeqForIE); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeReleaseAltWithKeyPress", lvg, KPRes.AutoTypeReleaseAltWithKeyPress); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeAdjustKeyboardLayout", lvg, KPRes.SameKeybLayout); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeCancelOnWindowChange", lvg, KPRes.AutoTypeCancelOnWindowChange); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeCancelOnTitleChange", lvg, KPRes.AutoTypeCancelOnTitleChange); lvg = new ListViewGroup(KPRes.Advanced); m_lvAdvanced.Groups.Add(lvg); if(!Program.Config.Integration.SearchKeyFiles) Program.Config.Integration.SearchKeyFilesOnRemovableMedia = false; ListViewItem lviSearch = m_cdxAdvanced.CreateItem( Program.Config.Integration, "SearchKeyFiles", lvg, KPRes.SearchKeyFiles); ListViewItem lviSearchRmv = m_cdxAdvanced.CreateItem( Program.Config.Integration, "SearchKeyFilesOnRemovableMedia", lvg, KPRes.SearchKeyFilesAlsoOnRemovable); m_cdxAdvanced.AddLink(lviSearch, lviSearchRmv, CheckItemLinkType.UncheckedUnchecked); m_cdxAdvanced.AddLink(lviSearchRmv, lviSearch, CheckItemLinkType.CheckedChecked); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "RememberKeySources", lvg, KPRes.RememberKeySources); m_cdxAdvanced.CreateItem(Program.Config.Application, "RememberWorkingDirectories", lvg, KPRes.RememberWorkingDirectories); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "SeparateHidingSettings", lvg, KPRes.RememberHidingSettings); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "UnhideButtonAlsoUnhidesSource", lvg, KPRes.UnhideSourceCharactersToo); m_cdxAdvanced.CreateItem(Program.Config.Application, "VerifyWrittenFileAfterSaving", lvg, KPRes.VerifyWrittenFileAfterSave); m_cdxAdvanced.CreateItem(Program.Config.Application, "UseTransactedFileWrites", lvg, KPRes.UseTransactedDatabaseWrites); m_cdxAdvanced.CreateItem(Program.Config.Application, "UseFileLocks", lvg, KPRes.UseFileLocks + " " + KPRes.NotRecommended); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "TanExpiresOnUse", lvg, KPRes.TanExpiresOnUse); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "RecycleBinCollapse", lvg, KPRes.RecycleBinCollapse); m_cdxAdvanced.CreateItem(Program.Config.UI, "SecureDesktopPlaySound", lvg, KPRes.SecDeskPlaySound); m_cdxAdvanced.CreateItem(Program.Config.UI, "OptimizeForScreenReader", lvg, KPRes.OptimizeForScreenReader); m_cdxAdvanced.UpdateData(false); m_lvAdvanced.Columns[0].Width = m_lvAdvanced.ClientRectangle.Width - UIUtil.GetVScrollBarWidth() - 1; if(AppConfigEx.IsOptionEnforced(Program.Config.Integration, "ProxyType") || AppConfigEx.IsOptionEnforced(Program.Config.Integration, "ProxyAddress")) m_btnProxy.Enabled = false; }
private void LoadSecurityOptions() { AceWorkspaceLocking aceWL = Program.Config.Security.WorkspaceLocking; uint uLockTime = aceWL.LockAfterTime; bool bLockTime = (uLockTime > 0); m_numLockAfterTime.Value = (bLockTime ? uLockTime : 300); m_cbLockAfterTime.Checked = bLockTime; if(AppConfigEx.IsOptionEnforced(aceWL, "LockAfterTime")) m_cbLockAfterTime.Enabled = false; uLockTime = aceWL.LockAfterGlobalTime; bLockTime = (uLockTime > 0); m_numLockAfterGlobalTime.Value = (bLockTime ? uLockTime : 240); m_cbLockAfterGlobalTime.Checked = bLockTime; if(AppConfigEx.IsOptionEnforced(aceWL, "LockAfterGlobalTime")) m_cbLockAfterGlobalTime.Enabled = false; int nDefaultExpireDays = Program.Config.Defaults.NewEntryExpiresInDays; if(nDefaultExpireDays < 0) m_cbDefaultExpireDays.Checked = false; else { m_cbDefaultExpireDays.Checked = true; try { m_numDefaultExpireDays.Value = nDefaultExpireDays; } catch(Exception) { Debug.Assert(false); } } if(AppConfigEx.IsOptionEnforced(Program.Config.Defaults, "NewEntryExpiresInDays")) m_cbDefaultExpireDays.Enabled = false; int nClipClear = Program.Config.Security.ClipboardClearAfterSeconds; if(nClipClear >= 0) { m_cbClipClearTime.Checked = true; m_numClipClearTime.Value = nClipClear; } else m_cbClipClearTime.Checked = false; if(AppConfigEx.IsOptionEnforced(Program.Config.Security, "ClipboardClearAfterSeconds")) m_cbClipClearTime.Enabled = false; m_lvSecurityOptions.Columns.Add(string.Empty); // Resize below ListViewGroup lvg = new ListViewGroup(KPRes.Options); m_lvSecurityOptions.Groups.Add(lvg); Debug.Assert(lvg.ListView == m_lvSecurityOptions); m_cdxSecurityOptions = new CheckedLVItemDXList(m_lvSecurityOptions, true); bool? obNoSEv = null; // Allow read-only by enforced config string strSEvSuffix = string.Empty; if(MonoWorkarounds.IsRequired(1378)) { obNoSEv = true; strSEvSuffix = " (" + KPRes.UnsupportedByMono + ")"; } m_cdxSecurityOptions.CreateItem(aceWL, "LockOnWindowMinimize", lvg, KPRes.LockOnMinimize); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnSessionSwitch", lvg, KPRes.LockOnSessionSwitch + strSEvSuffix, obNoSEv); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnSuspend", lvg, KPRes.LockOnSuspend + strSEvSuffix, obNoSEv); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnRemoteControlChange", lvg, KPRes.LockOnRemoteControlChange + strSEvSuffix, obNoSEv); m_cdxSecurityOptions.CreateItem(aceWL, "ExitInsteadOfLockingAfterTime", lvg, KPRes.ExitInsteadOfLockingAfterTime); m_cdxSecurityOptions.CreateItem(aceWL, "AlwaysExitInsteadOfLocking", lvg, KPRes.ExitInsteadOfLockingAlways); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "ClipboardClearOnExit", lvg, KPRes.ClipboardClearOnExit); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "UseClipboardViewerIgnoreFormat", lvg, KPRes.ClipboardViewerIgnoreFormat + " " + KPRes.NotRecommended); if(NativeLib.IsLibraryInstalled()) m_cdxSecurityOptions.CreateItem(Program.Config.Native, "NativeKeyTransformations", lvg, KPRes.NativeLibUse); bool? obNoWin = null; // Allow read-only by enforced config if(NativeLib.IsUnix()) obNoWin = true; m_cdxSecurityOptions.CreateItem(Program.Config.Security, "MasterKeyOnSecureDesktop", lvg, KPRes.MasterKeyOnSecureDesktop, obNoWin); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "ClearKeyCommandLineParams", lvg, KPRes.ClearKeyCmdLineParams); m_cdxSecurityOptions.UpdateData(false); UIUtil.ResizeColumns(m_lvSecurityOptions, true); }
private void LoadAdvancedOptions() { bool? obNoMin = null; if(MonoWorkarounds.IsRequired(1418)) obNoMin = true; m_lvAdvanced.Columns.Add(string.Empty); // Resize below m_cdxAdvanced = new CheckedLVItemDXList(m_lvAdvanced, true); ListViewGroup lvg = new ListViewGroup(KPRes.StartAndExit); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "OpenLastFile", lvg, KPRes.AutoRememberOpenLastFile); m_cdxAdvanced.CreateItem(Program.Config.Integration, "LimitToSingleInstance", lvg, KPRes.LimitSingleInstance); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "CheckForUpdate", lvg, KPRes.CheckForUpdAtStart); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "MinimizedAndLocked", lvg, KPRes.StartMinimizedAndLocked, obNoMin); m_cdxAdvanced.CreateItem(Program.Config.Application.FileClosing, "AutoSave", lvg, KPRes.AutoSaveAtExit); lvg = new ListViewGroup(KPRes.AfterDatabaseOpen); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowExpiredEntries", lvg, KPRes.AutoShowExpiredEntries); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowSoonToExpireEntries", lvg, KPRes.AutoShowSoonToExpireEntries); lvg = new ListViewGroup(KPRes.AutoType); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByTitle", lvg, KPRes.AutoTypeMatchByTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByUrlInTitle", lvg, KPRes.AutoTypeMatchByUrlInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByUrlHostInTitle", lvg, KPRes.AutoTypeMatchByUrlHostInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByTagInTitle", lvg, KPRes.AutoTypeMatchByTagInTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeExpiredCanMatch", lvg, KPRes.ExpiredEntriesCanMatch); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeAlwaysShowSelDialog", lvg, KPRes.AutoTypeAlwaysShowSelDialog); lvg = new ListViewGroup(KPRes.AutoType + " - " + KPRes.SendingNoun); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypePrependInitSequenceForIE", lvg, KPRes.AutoTypePrependInitSeqForIE); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeReleaseAltWithKeyPress", lvg, KPRes.AutoTypeReleaseAltWithKeyPress); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeAdjustKeyboardLayout", lvg, KPRes.SameKeybLayout); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeAllowInterleaved", lvg, KPRes.InterleavedKeySending); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeCancelOnWindowChange", lvg, KPRes.AutoTypeCancelOnWindowChange); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeCancelOnTitleChange", lvg, KPRes.AutoTypeCancelOnTitleChange); lvg = new ListViewGroup(KPRes.IOConnectionLong); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application, "VerifyWrittenFileAfterSaving", lvg, KPRes.VerifyWrittenFileAfterSave); m_cdxAdvanced.CreateItem(Program.Config.Application, "UseTransactedFileWrites", lvg, KPRes.UseTransactedDatabaseWrites); m_cdxAdvanced.CreateItem(Program.Config.Application, "FileTxExtra", lvg, KPRes.FileTxExtra + " (" + KPRes.Slow + ")"); m_cdxAdvanced.CreateItem(Program.Config.Application, "UseFileLocks", lvg, KPRes.UseFileLocks + " " + KPRes.NotRecommended); m_cdxAdvanced.CreateItem(Program.Config.Application, "SaveForceSync", lvg, KPRes.SaveForceSync); m_cdxAdvanced.CreateItem(Program.Config.Security, "SslCertsAcceptInvalid", lvg, KPRes.SslCertsAcceptInvalid); lvg = new ListViewGroup(KPRes.Advanced); m_lvAdvanced.Groups.Add(lvg); if(!Program.Config.Integration.SearchKeyFiles) Program.Config.Integration.SearchKeyFilesOnRemovableMedia = false; ListViewItem lviSearch = m_cdxAdvanced.CreateItem( Program.Config.Integration, "SearchKeyFiles", lvg, KPRes.SearchKeyFiles); ListViewItem lviSearchRmv = m_cdxAdvanced.CreateItem( Program.Config.Integration, "SearchKeyFilesOnRemovableMedia", lvg, KPRes.SearchKeyFilesAlsoOnRemovable); m_cdxAdvanced.AddLink(lviSearch, lviSearchRmv, CheckItemLinkType.UncheckedUnchecked); m_cdxAdvanced.AddLink(lviSearchRmv, lviSearch, CheckItemLinkType.CheckedChecked); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "RememberKeySources", lvg, KPRes.RememberKeySources); m_cdxAdvanced.CreateItem(Program.Config.Application, "RememberWorkingDirectories", lvg, KPRes.RememberWorkingDirectories); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "SeparateHidingSettings", lvg, KPRes.RememberHidingSettings); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "UnhideButtonAlsoUnhidesSource", lvg, KPRes.UnhideSourceCharactersToo); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "TanExpiresOnUse", lvg, KPRes.TanExpiresOnUse); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "RecycleBinCollapse", lvg, KPRes.RecycleBinCollapse); m_cdxAdvanced.CreateItem(Program.Config.UI, "SecureDesktopPlaySound", lvg, KPRes.SecDeskPlaySound); m_cdxAdvanced.CreateItem(Program.Config.UI, "OptimizeForScreenReader", lvg, KPRes.OptimizeForScreenReader); m_cdxAdvanced.UpdateData(false); UIUtil.ResizeColumns(m_lvAdvanced, true); if(AppConfigEx.IsOptionEnforced(Program.Config.Integration, "ProxyType") || AppConfigEx.IsOptionEnforced(Program.Config.Integration, "ProxyAddress")) m_btnProxy.Enabled = false; }
public OptionsPanel(KeeAgentExt ext) { this.ext = ext; isUnix = Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX; InitializeComponent(); // make transparent so tab styling shows SetStyle(ControlStyles.SupportsTransparentBackColor, true); BackColor = Color.Transparent; modeComboBox.Items.Add(Translatable.OptionAgentModeAuto); modeComboBox.Items.Add(Translatable.OptionAgentModeAgent); modeComboBox.Items.Add(Translatable.OptionAgentModeClient); switch (ext.Options.AgentMode) { case AgentMode.Client: modeComboBox.SelectedItem = Translatable.OptionAgentModeClient; break; case AgentMode.Server: modeComboBox.SelectedItem = Translatable.OptionAgentModeAgent; break; default: modeComboBox.SelectedItem = Translatable.OptionAgentModeAuto; break; } // additional configuration of list view customListViewEx.UseCompatibleStateImageBehavior = false; UIUtil.SetExplorerTheme(customListViewEx, false); optionsList = new CheckedLVItemDXList(customListViewEx, true); var optionsGroup = new ListViewGroup("common", "Options"); customListViewEx.Groups.Add(optionsGroup); optionsList.CreateItem(ext.Options, "IgnoreMissingExternalKeyFiles", optionsGroup, Translatable.OptionIgnoreMissingExternalKeyFiles); var agentModeOptionsGroup = new ListViewGroup("agentMode", "Agent Mode Options (no effect in Client Mode)"); customListViewEx.Groups.Add(agentModeOptionsGroup); optionsList.CreateItem(ext.Options, "AlwaysConfirm", agentModeOptionsGroup, Translatable.OptionAlwaysConfirm); optionsList.CreateItem(ext.Options, "ShowBalloon", agentModeOptionsGroup, Translatable.OptionShowBalloon); //mOptionsList.CreateItem(aExt.Options, "LoggingEnabled", optionsGroup, // Translatable.optionLoggingEnabled); optionsList.CreateItem (ext.Options, "UnlockOnActivity", agentModeOptionsGroup, Translatable.OptionUnlockOnActivity); optionsList.CreateItem(ext.Options, "UserPicksKeyOnRequestIdentities", agentModeOptionsGroup, Translatable.OptionUserPicksKeyOnRequestIdentities); columnHeader.Width = customListViewEx.ClientRectangle.Width - UIUtil.GetVScrollBarWidth() - 1; if (isUnix) { groupBox1.Text = "Agent mode socket file"; useCygwinSocketCheckBox.Visible = false; cygwinSocketPathTextBox.Text = ext.Options.UnixSocketPath; cygwinSocketPathTextBox.Enabled = true; cygwinPathBrowseButton.Enabled = true; useMsysSocketCheckBox.Visible = false; label4.Visible = false; msysSocketPathTextBox.Visible = false; msysPathBrowseButton.Visible = false; } else { useCygwinSocketCheckBox.Checked = ext.Options.UseCygwinSocket; cygwinSocketPathTextBox.Text = ext.Options.CygwinSocketPath; useMsysSocketCheckBox.Checked = ext.Options.UseMsysSocket; msysSocketPathTextBox.Text = ext.Options.MsysSocketPath; } optionsList.UpdateData(false); }