private void LoadSecurityOptions() { m_numLockAfterTime.Value = Program.Config.Security.WorkspaceLocking.LockAfterTime; m_cbLockAfterTime.Checked = (m_numLockAfterTime.Value > 0); 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); } } int nClipClear = Program.Config.Security.ClipboardClearAfterSeconds; if (nClipClear >= 0) { m_cbClipClearTime.Checked = true; m_numClipClearTime.Value = nClipClear; } else { m_cbClipClearTime.Checked = 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.CreateItem(Program.Config.Security.WorkspaceLocking, "LockOnWindowMinimize", m_lvSecurityOptions, lvg, KPRes.LockOnMinimize); m_cdxSecurityOptions.CreateItem(Program.Config.Security.WorkspaceLocking, "LockOnSessionLock", m_lvSecurityOptions, lvg, KPRes.LockOnSessionLock); m_cdxSecurityOptions.CreateItem(Program.Config.Security, "ClipboardClearOnExit", m_lvSecurityOptions, lvg, KPRes.ClipboardClearOnExit); if (NativeLib.IsLibraryInstalled()) { m_cdxSecurityOptions.CreateItem(Program.Config.Native, "NativeKeyTransformations", m_lvSecurityOptions, lvg, KPRes.NativeLibUse); } m_cdxSecurityOptions.UpdateData(false); m_lvSecurityOptions.Columns[0].Width = m_lvSecurityOptions.ClientRectangle.Width - 36; }
private void LoadGuiOptions() { 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.CreateItem(Program.Config.MainWindow, "CloseButtonMinimizesWindow", m_lvGuiOptions, lvg, KPRes.CloseButtonMinimizes); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeToTray", m_lvGuiOptions, lvg, KPRes.MinimizeToTray); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "ShowOnlyIfTrayed", m_lvGuiOptions, lvg, KPRes.ShowTrayOnlyIfTrayed); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowFullPathInTitle", m_lvGuiOptions, lvg, KPRes.ShowFullPathInTitleBar); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterClipboardCopy", m_lvGuiOptions, lvg, KPRes.MinimizeAfterCopy); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindExcludeExpired", m_lvGuiOptions, lvg, KPRes.QuickSearchExcludeExpired); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusResultsAfterQuickFind", m_lvGuiOptions, lvg, KPRes.FocusResultsAfterQuickFind); lvg = new ListViewGroup(KPRes.EntryList); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowGridLines", m_lvGuiOptions, lvg, KPRes.ShowGridLines); m_cdxGuiOptions.UpdateData(false); m_lvGuiOptions.Columns[0].Width = m_lvGuiOptions.ClientRectangle.Width - 36; }
private void LoadPolicyOption(string strPropertyName, string strDisplayName, string strDisplayDesc) { ListViewItem lvi = m_cdxPolicy.CreateItem(Program.Config.Security.Policy, strPropertyName, null, strDisplayName + "*"); lvi.SubItems.Add(strDisplayDesc); }
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); m_cdxAdvanced.CreateItem(Program.Config.Application, "AutoSaveAfterEntryEdit", lvg, KPRes.AutoSaveAfterEntryEdit); 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; } }
private void LoadGuiOptions() { m_strInitialTsRenderer = Program.Config.UI.ToolStripRenderer; bool?obNoMin = null; if (MonoWorkarounds.IsRequired(1418)) { obNoMin = true; } m_lvGuiOptions.Columns.Add(KPRes.Options); // 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, "MinimizeToTray", lvg, KPRes.MinimizeToTray); 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, "MinimizeAfterAutoType", lvg, KPRes.MinimizeAfterAutoType); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterLocking", lvg, KPRes.MinimizeAfterLocking); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterOpeningDatabase", lvg, KPRes.MinimizeAfterOpeningDatabase, obNoMin); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "CloseButtonMinimizesWindow", lvg, KPRes.CloseButtonMinimizes); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EscMinimizesToTray", lvg, KPRes.EscMinimizesToTray); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowFullPathInTitle", lvg, KPRes.ShowFullPathInTitleBar); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "DisableSaveIfNotModified", lvg, KPRes.DisableSaveIfNotModified); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "HideCloseDatabaseButton", lvg, KPRes.HideCloseDatabaseTb); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ShowAdvAutoTypeCommands", lvg, KPRes.ShowAdvAutoTypeCommands); 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); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EntrySelGroupSel", lvg, KPRes.EntrySelGroupSel); 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); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EntryListShowDerefDataAndRefs", lvg, KPRes.ShowDerefDataAndRefs); // 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.TrayIcon); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "ShowOnlyIfTrayed", lvg, KPRes.ShowTrayOnlyIfTrayed); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "GrayIcon", lvg, KPRes.TrayIconGray); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "SingleClickDefault", lvg, KPRes.TrayIconSingleClick); lvg = new ListViewGroup(KPRes.Dialogs); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ShowRecycleConfirmDialog", lvg, KPRes.RecycleShowConfirm); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ShowDbMntncResultsDialog", lvg, KPRes.DbMntncResults); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ShowEmSheetDialog", lvg, KPRes.EmergencySheetAsk); 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, "TreeViewShowLines", lvg, KPRes.TreeViewShowLines); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ForceSystemFontUnix", lvg, KPRes.ForceSystemFontUnix); m_cdxGuiOptions.UpdateData(false); UIUtil.ResizeColumns(m_lvGuiOptions, true); 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; } m_argbAltItemBg = Program.Config.MainWindow.EntryListAlternatingBgColor; m_cbCustomAltColor.Checked = (m_argbAltItemBg != 0); UpdateButtonImages(); if (AppConfigEx.IsOptionEnforced(Program.Config.UI, "StandardFont")) { m_btnSelFont.Enabled = false; } if (AppConfigEx.IsOptionEnforced(Program.Config.UI, "PasswordFont") || MonoWorkarounds.IsRequired(5795)) { m_btnSelPwFont.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.LockOnMinimizeTaskbar); m_cdxSecurityOptions.CreateItem(aceWL, "LockOnWindowMinimizeToTray", lvg, KPRes.LockOnMinimizeTray); 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.CreateItem(Program.Config.Security.MasterPassword, "RememberWhileOpen", lvg, KPRes.MasterPasswordRmbWhileOpen); m_cdxSecurityOptions.UpdateData(false); UIUtil.ResizeColumns(m_lvSecurityOptions, true); }
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); 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.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 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 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 LoadAdvancedOptions() { m_lvAdvanced.Columns.Add(string.Empty, 200); // Resize below ListViewGroup lvg = new ListViewGroup(KPRes.StartAndExit); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "OpenLastFile", m_lvAdvanced, lvg, KPRes.AutoOpenLastFile); m_cdxAdvanced.CreateItem(Program.Config.Integration, "LimitToSingleInstance", m_lvAdvanced, lvg, KPRes.LimitSingleInstance); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "CheckForUpdate", m_lvAdvanced, lvg, KPRes.CheckForUpdAtStart); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "MinimizedAndLocked", m_lvAdvanced, lvg, KPRes.StartMinimizedAndLocked); m_cdxAdvanced.CreateItem(Program.Config.Application.FileClosing, "AutoSave", m_lvAdvanced, lvg, KPRes.AutoSaveAtExit); lvg = new ListViewGroup(KPRes.AfterDatabaseOpen); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowExpiredEntries", m_lvAdvanced, lvg, KPRes.AutoShowExpiredEntries); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowSoonToExpireEntries", m_lvAdvanced, lvg, KPRes.AutoShowSoonToExpireEntries); lvg = new ListViewGroup(KPRes.AutoType); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypePrependInitSequenceForIE", m_lvAdvanced, lvg, KPRes.AutoTypePrependInitSeqForIE); lvg = new ListViewGroup(KPRes.Advanced); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "SearchKeyFilesOnRemovableMedia", m_lvAdvanced, lvg, KPRes.SearchKeyFilesOnRemovable); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "SeparateHidingSettings", m_lvAdvanced, lvg, KPRes.RememberHidingSettings); m_cdxAdvanced.CreateItem(Program.Config.UI, "OptimizeForScreenReader", m_lvAdvanced, lvg, KPRes.OptimizeForScreenReader); m_cdxAdvanced.UpdateData(false); m_lvAdvanced.Columns[0].Width = m_lvAdvanced.ClientRectangle.Width - 36; }
public OptionsPanel(KeeAgentExt ext) { InitializeComponent(); if (Type.GetType("Mono.Runtime") != null) { const int xOffset = -30; const int yOffset = -30; helpButton.Left += xOffset; customListViewEx.Width += xOffset; groupBox1.Width += xOffset; groupBox1.Height += yOffset; } this.ext = ext; isUnix = Environment.OSVersion.Platform == PlatformID.Unix || Environment.OSVersion.Platform == PlatformID.MacOSX; // 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); optionsList.CreateItem(ext.Options, "AllowAccessFromNonElevatedProcess", optionsGroup, Translatable.OptionAllowAccessFromNonElevatedProcess); 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); if (!isUnix) { optionsList.CreateItem(ext.Options, "UseWindowsOpenSshPipe", agentModeOptionsGroup, Translatable.OptionUseWindowsOpenSshPipe); } 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); }
private void LoadAdvancedOptions() { m_lvAdvanced.Columns.Add(string.Empty, 200); // Resize below ListViewGroup lvg = new ListViewGroup(KPRes.StartAndExit); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "OpenLastFile", m_lvAdvanced, lvg, KPRes.AutoRememberOpenLastFile); m_cdxAdvanced.CreateItem(Program.Config.Integration, "LimitToSingleInstance", m_lvAdvanced, lvg, KPRes.LimitSingleInstance); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "CheckForUpdate", m_lvAdvanced, lvg, KPRes.CheckForUpdAtStart); m_cdxAdvanced.CreateItem(Program.Config.Application.Start, "MinimizedAndLocked", m_lvAdvanced, lvg, KPRes.StartMinimizedAndLocked); m_cdxAdvanced.CreateItem(Program.Config.Application.FileClosing, "AutoSave", m_lvAdvanced, lvg, KPRes.AutoSaveAtExit); lvg = new ListViewGroup(KPRes.AfterDatabaseOpen); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowExpiredEntries", m_lvAdvanced, lvg, KPRes.AutoShowExpiredEntries); m_cdxAdvanced.CreateItem(Program.Config.Application.FileOpening, "ShowSoonToExpireEntries", m_lvAdvanced, lvg, KPRes.AutoShowSoonToExpireEntries); lvg = new ListViewGroup(KPRes.AutoType); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeMatchByTitle", m_lvAdvanced, lvg, KPRes.AutoTypeMatchByTitle); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypePrependInitSequenceForIE", m_lvAdvanced, lvg, KPRes.AutoTypePrependInitSeqForIE); m_cdxAdvanced.CreateItem(Program.Config.Integration, "AutoTypeReleaseAltWithKeyPress", m_lvAdvanced, lvg, KPRes.AutoTypeReleaseAltWithKeyPress); lvg = new ListViewGroup(KPRes.Advanced); m_lvAdvanced.Groups.Add(lvg); m_cdxAdvanced.CreateItem(Program.Config.Integration, "SearchKeyFiles", m_lvAdvanced, lvg, KPRes.SearchKeyFiles); m_cdxAdvanced.CreateItem(Program.Config.Integration, "SearchKeyFilesOnRemovableMedia", m_lvAdvanced, lvg, KPRes.SearchKeyFilesAlsoOnRemovable); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "RememberKeySources", m_lvAdvanced, lvg, KPRes.RememberKeySources); m_cdxAdvanced.CreateItem(Program.Config.UI.Hiding, "SeparateHidingSettings", m_lvAdvanced, lvg, KPRes.RememberHidingSettings); m_cdxAdvanced.CreateItem(Program.Config.Application, "VerifyWrittenFileAfterSaving", m_lvAdvanced, lvg, KPRes.VerifyWrittenFileAfterSave); m_cdxAdvanced.CreateItem(Program.Config.Application, "UseTransactedFileWrites", m_lvAdvanced, lvg, KPRes.UseTransactedDatabaseWrites); m_cdxAdvanced.CreateItem(Program.Config.Defaults, "TanExpiresOnUse", m_lvAdvanced, lvg, KPRes.TanExpiresOnUse); m_cdxAdvanced.CreateItem(Program.Config.UI, "OptimizeForScreenReader", m_lvAdvanced, lvg, KPRes.OptimizeForScreenReader); m_cdxAdvanced.UpdateData(false); m_lvAdvanced.Columns[0].Width = m_lvAdvanced.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.CreateItem(Program.Config.MainWindow, "CloseButtonMinimizesWindow", m_lvGuiOptions, lvg, KPRes.CloseButtonMinimizes); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeToTray", m_lvGuiOptions, lvg, KPRes.MinimizeToTray); m_cdxGuiOptions.CreateItem(Program.Config.UI.TrayIcon, "ShowOnlyIfTrayed", m_lvGuiOptions, lvg, KPRes.ShowTrayOnlyIfTrayed); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "ShowFullPathInTitle", m_lvGuiOptions, lvg, KPRes.ShowFullPathInTitleBar); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "DropToBackAfterClipboardCopy", m_lvGuiOptions, lvg, KPRes.DropToBackOnCopy); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterClipboardCopy", m_lvGuiOptions, lvg, KPRes.MinimizeAfterCopy); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterLocking", m_lvGuiOptions, lvg, KPRes.MinimizeAfterLocking); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "MinimizeAfterOpeningDatabase", m_lvGuiOptions, lvg, KPRes.MinimizeAfterOpeningDatabase); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindSearchInPasswords", m_lvGuiOptions, lvg, KPRes.QuickSearchInPasswords); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "QuickFindExcludeExpired", m_lvGuiOptions, lvg, KPRes.QuickSearchExcludeExpired); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusResultsAfterQuickFind", m_lvGuiOptions, lvg, KPRes.FocusResultsAfterQuickFind); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "FocusQuickFindOnUntray", m_lvGuiOptions, lvg, KPRes.FocusQuickFindOnUntray); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "DisableSaveIfNotModified", m_lvGuiOptions, 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", m_lvGuiOptions, lvg, KPRes.EntryListAutoResizeColumns); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "EntryListAlternatingBgColors", m_lvGuiOptions, lvg, KPRes.AlternatingBgColors); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow, "CopyUrlsInsteadOfOpening", m_lvGuiOptions, lvg, KPRes.CopyUrlsInsteadOfOpening); lvg = new ListViewGroup(KPRes.EntryView); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.MainWindow.EntryView, "HideProtectedCustomStrings", m_lvGuiOptions, lvg, KPRes.EntryViewHideProtectedCustomStrings); lvg = new ListViewGroup(KPRes.Advanced); m_lvGuiOptions.Groups.Add(lvg); m_cdxGuiOptions.CreateItem(Program.Config.UI, "UseCustomToolStripRenderer", m_lvGuiOptions, lvg, KPRes.UseCustomToolStripRenderer); m_cdxGuiOptions.CreateItem(Program.Config.UI, "ForceSystemFontUnix", m_lvGuiOptions, lvg, KPRes.ForceSystemFontUnix); 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; } }