本文整理汇总了C++中COptions::GetOptionVal方法的典型用法代码示例。如果您正苦于以下问题:C++ COptions::GetOptionVal方法的具体用法?C++ COptions::GetOptionVal怎么用?C++ COptions::GetOptionVal使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类COptions
的用法示例。
在下文中一共展示了COptions::GetOptionVal方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: LoadPage
bool COptionsPageEdit::LoadPage()
{
bool failure = false;
COptions* pOptions = COptions::Get();
wxString editor = pOptions->GetOption(OPTION_EDIT_DEFAULTEDITOR);
if (editor.empty() || editor[0] == '0')
SetRCheck(XRCID("ID_DEFAULT_NONE"), true, failure);
else if (editor[0] == '1')
SetRCheck(XRCID("ID_DEFAULT_TEXT"), true, failure);
else
{
if (editor[0] == '2')
editor = editor.Mid(1);
SetRCheck(XRCID("ID_DEFAULT_CUSTOM"), true, failure);
SetText(XRCID("ID_EDITOR"), editor, failure);
}
if (pOptions->GetOptionVal(OPTION_EDIT_ALWAYSDEFAULT))
SetRCheck(XRCID("ID_USEDEFAULT"), true, failure);
else
SetRCheck(XRCID("ID_USEASSOCIATIONS"), true, failure);
SetCheckFromOption(XRCID("ID_EDIT_TRACK_LOCAL"), OPTION_EDIT_TRACK_LOCAL, failure);
if (!failure)
SetCtrlState();
return !failure;
}
示例2: LoadPage
bool COptionsPageEditAssociations::LoadPage()
{
bool failure = false;
COptions* pOptions = COptions::Get();
SetTextFromOption(XRCID("ID_ASSOCIATIONS"), OPTION_EDIT_CUSTOMASSOCIATIONS, failure);
SetCheck(XRCID("ID_INHERIT"), pOptions->GetOptionVal(OPTION_EDIT_INHERITASSOCIATIONS) != 0, failure);
return !failure;
}
示例3: InitAutoUpdateCheck
void CUpdateWizard::InitAutoUpdateCheck()
{
COptions* pOptions = COptions::Get();
wxASSERT(pOptions->GetOptionVal(OPTION_UPDATECHECK));
if (CBuildInfo::GetVersion() == _T("custom build"))
return;
// Check every hour if allowed to check for updates
m_autoCheckTimer.Start(1000 * 3600);
if (!CanAutoCheckForUpdateNow())
{
DisplayUpdateAvailability(false);
return;
}
else
{
m_autoUpdateCheckRunning = true;
const wxDateTime& now = wxDateTime::Now();
pOptions->SetOption(OPTION_UPDATECHECK_LASTDATE, now.Format(_T("%Y-%m-%d %H:%M:%S")));
StartUpdateCheck();
}
}