本文整理汇总了C++中PWSprefs::Store方法的典型用法代码示例。如果您正苦于以下问题:C++ PWSprefs::Store方法的具体用法?C++ PWSprefs::Store怎么用?C++ PWSprefs::Store使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PWSprefs
的用法示例。
在下文中一共展示了PWSprefs::Store方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPreferencesClick
void PasswordSafeFrame::OnPreferencesClick( wxCommandEvent& /* evt */ )
{
PWSprefs* prefs = PWSprefs::GetInstance();
const StringX sxOldDBPrefsString(prefs->Store());
COptions *window = new COptions(this);
if (window->ShowModal() == wxID_OK) {
StringX sxNewDBPrefsString(prefs->Store(true));
// Update system tray icon if visible so changes show up immediately
if (m_sysTray && prefs->GetPref(PWSprefs::UseSystemTray))
m_sysTray->ShowIcon();
if (!m_core.GetCurFile().empty() && !m_core.IsReadOnly() &&
m_core.GetReadFileVersion() == PWSfile::VCURRENT) {
if (sxOldDBPrefsString != sxNewDBPrefsString) {
Command *pcmd = DBPrefsCommand::Create(&m_core, sxNewDBPrefsString);
if (pcmd) {
//I don't know why notifications should ever be suspended, but that's how
//things were before I messed with them, so I want to limit the damage by
//enabling notifications only as long as required and no more
m_core.ResumeOnDBNotification();
Execute(pcmd); //deleted automatically
m_core.SuspendOnDBNotification();
}
}
}
}
window->Destroy();
}