本文整理汇总了C++中PWSprefs::UpdateFromCopyPrefs方法的典型用法代码示例。如果您正苦于以下问题:C++ PWSprefs::UpdateFromCopyPrefs方法的具体用法?C++ PWSprefs::UpdateFromCopyPrefs怎么用?C++ PWSprefs::UpdateFromCopyPrefs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PWSprefs
的用法示例。
在下文中一共展示了PWSprefs::UpdateFromCopyPrefs方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateCopyPreferences
//.........这里部分代码省略.........
m_OPTMD.ConfirmCopy == FALSE, true);
prefs->SetPref(PWSprefs::LockOnWindowLock,
m_OPTMD.LockOnWindowLock == TRUE, true);
prefs->SetPref(PWSprefs::CopyPasswordWhenBrowseToURL,
m_OPTMD.CopyPswdBrowseURL == TRUE, true);
prefs->SetPref(PWSprefs::UseSystemTray,
m_OPTMD.UseSystemTray == TRUE, true);
prefs->SetPref(PWSprefs::HideSystemTray,
m_OPTMD.HideSystemTray == TRUE, true);
prefs->SetPref(PWSprefs::MaxREItems,
m_OPTMD.MaxREItems, true);
prefs->SetPref(PWSprefs::MaxMRUItems,
m_OPTMD.MaxMRUItems, true);
if (m_OPTMD.MaxMRUItems == 0) {
// Put them on File menu where they don't take up any room
prefs->SetPref(PWSprefs::MRUOnFileMenu, true, true);
} else {
prefs->SetPref(PWSprefs::MRUOnFileMenu,
m_OPTMD.MRUOnFileMenu == TRUE, true);
}
prefs->SetPref(PWSprefs::DefaultOpenRO,
m_OPTMD.DefaultOpenRO == TRUE, true);
prefs->SetPref(PWSprefs::MultipleInstances,
m_OPTMD.MultipleInstances == TRUE, true);
// Now update database preferences
// In PropertyPage alphabetic order
prefs->SetPref(PWSprefs::SaveImmediately,
m_OPTMD.SaveImmediately == TRUE, true);
prefs->SetPref(PWSprefs::ShowPWDefault,
m_OPTMD.ShowPasswordInEdit == TRUE, true);
prefs->SetPref(PWSprefs::ShowUsernameInTree,
m_OPTMD.ShowUsernameInTree == TRUE, true);
prefs->SetPref(PWSprefs::ShowPasswordInTree,
m_OPTMD.ShowPasswordInTree == TRUE, true);
prefs->SetPref(PWSprefs::TreeDisplayStatusAtOpen,
m_OPTMD.TreeDisplayStatusAtOpen, true);
prefs->SetPref(PWSprefs::ShowNotesDefault,
m_OPTMD.NotesShowInEdit == TRUE, true);
prefs->SetPref(PWSprefs::MaintainDateTimeStamps,
m_OPTMD.MaintainDatetimeStamps == TRUE, true);
prefs->SetPref(PWSprefs::UseDefaultUser,
m_OPTMD.UseDefuser == TRUE, true);
prefs->SetPref(PWSprefs::DefaultUsername,
LPCWSTR(m_OPTMD.DefUsername), true);
if (m_OPTMD.AutotypeText.IsEmpty() || m_OPTMD.AutotypeText == DEFAULT_AUTOTYPE)
prefs->SetPref(PWSprefs::DefaultAutotypeString, L"", true);
else if (m_OPTMD.AutotypeText != DEFAULT_AUTOTYPE)
prefs->SetPref(PWSprefs::DefaultAutotypeString,
LPCWSTR(m_OPTMD.AutotypeText), true);
prefs->SetPref(PWSprefs::DefaultAutotypeDelay,
m_OPTMD.AutotypeDelay,
true);
prefs->SetPref(PWSprefs::SavePasswordHistory,
m_OPTMD.SavePWHistory == TRUE, true);
if (m_OPTMD.SavePWHistory == TRUE)
prefs->SetPref(PWSprefs::NumPWHistoryDefault,
m_OPTMD.PWHistoryNumDefault, true);
prefs->SetPref(PWSprefs::LockDBOnIdleTimeout,
m_OPTMD.LockOnIdleTimeout == TRUE, true);
prefs->SetPref(PWSprefs::IdleTimeout,
m_OPTMD.IdleTimeOut, true);
GetMainDlg()->SetHashIters(m_OPTMD.HashIters);
// Changing ExplorerTypeTree changes order of items,
// which DisplayStatus implicitly depends upon
if (m_save_bExplorerTypeTree != m_OPTMD.ExplorerTypeTree)
m_bSaveGroupDisplayState = m_bRefreshViews = true;
// If user has turned on/changed warnings of expired passwords - check now
if (m_OPTMD.PreExpiryWarn == TRUE &&
(m_save_bPreExpiryWarn == FALSE ||
m_save_iPreExpiryWarnDays != m_OPTMD.PreExpiryWarnDays))
m_bCheckExpired = m_bRefreshViews = true;
// Deal with shortcuts
prefs->SetPref(PWSprefs::HotKey,
m_OPTMD.AppHotKeyValue, true);
prefs->SetPref(PWSprefs::HotKeyEnabled,
m_OPTMD.AppHotKeyEnabled == TRUE, true);
if (m_pp_shortcuts->HaveShortcutsChanged())
m_bUpdateShortcuts = true;
// Now copy across application preferences
// Any changes via Database preferences done via call to UpdateGUI from Command
prefs->UpdateFromCopyPrefs(PWSprefs::ptApplication);
// Keep prefs file updated
prefs->SaveApplicationPreferences();
}