本文整理汇总了C++中CItemData::IsURLEmpty方法的典型用法代码示例。如果您正苦于以下问题:C++ CItemData::IsURLEmpty方法的具体用法?C++ CItemData::IsURLEmpty怎么用?C++ CItemData::IsURLEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CItemData
的用法示例。
在下文中一共展示了CItemData::IsURLEmpty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnUpdateTrayBrowse
void DboxMain::OnUpdateTrayBrowse(CCmdUI *pCmdUI)
{
int nID = pCmdUI->m_nID;
ASSERT(((nID >= ID_MENUITEM_TRAYBROWSE1) && (nID <= ID_MENUITEM_TRAYBROWSEMAX)) ||
((nID >= ID_MENUITEM_TRAYBROWSEPLUS1) && (nID <= ID_MENUITEM_TRAYBROWSEPLUSMAX)));
CItemData ci;
const bool bDoAutotype = (nID >= ID_MENUITEM_TRAYBROWSEPLUS1) &&
(nID <= ID_MENUITEM_TRAYBROWSEPLUSMAX);
if (!bDoAutotype) {
if (!GetRUEntry(m_RUEList, nID - ID_MENUITEM_TRAYBROWSE1, ci))
return;
} else {
if (!GetRUEntry(m_RUEList, nID - ID_MENUITEM_TRAYBROWSEPLUS1, ci))
return;
}
if (ci.IsShortcut()) {
if (!SafeGetBaseEntry(ci, ci))
return;
}
// Has it an embedded URL
if (ci.IsURLEmpty()) {
pCmdUI->Enable(FALSE);
} else {
const bool bIsEmail = ci.IsURLEmail();
MapMenuShortcutsIter iter;
if (!bIsEmail && (nID >= ID_MENUITEM_TRAYBROWSE1) && (nID <= ID_MENUITEM_TRAYBROWSEMAX))
iter = m_MapMenuShortcuts.find(ID_MENUITEM_BROWSEURL);
else if (!bIsEmail && (nID >= ID_MENUITEM_TRAYBROWSEPLUS1) && (nID <= ID_MENUITEM_TRAYBROWSEPLUSMAX))
iter = m_MapMenuShortcuts.find(ID_MENUITEM_BROWSEURLPLUS);
else if (bIsEmail && (nID >= ID_MENUITEM_TRAYBROWSE1) && (nID <= ID_MENUITEM_TRAYBROWSEMAX))
iter = m_MapMenuShortcuts.find(ID_MENUITEM_SENDEMAIL);
ASSERT(iter != m_MapMenuShortcuts.end());
CString cs_text = iter->second.name.c_str();
int nPos = cs_text.Find(L"\t");
if (nPos > 0)
cs_text = cs_text.Left(nPos);
pCmdUI->SetText(cs_text);
}
}
示例2: OnTrayBrowse
void DboxMain::OnTrayBrowse(UINT nID)
{
ASSERT(((nID >= ID_MENUITEM_TRAYBROWSE1) && (nID <= ID_MENUITEM_TRAYBROWSEMAX)) ||
((nID >= ID_MENUITEM_TRAYBROWSEPLUS1) && (nID <= ID_MENUITEM_TRAYBROWSEPLUSMAX)));
CItemData ci;
const bool bDoAutotype = (nID >= ID_MENUITEM_TRAYBROWSEPLUS1) &&
(nID <= ID_MENUITEM_TRAYBROWSEPLUSMAX);
if (!bDoAutotype) {
if (!GetRUEntry(m_RUEList, nID - ID_MENUITEM_TRAYBROWSE1, ci))
return;
} else {
if (!GetRUEntry(m_RUEList, nID - ID_MENUITEM_TRAYBROWSEPLUS1, ci))
return;
}
if (ci.IsShortcut()) {
if (!SafeGetBaseEntry(ci, ci))
return;
}
if (!ci.IsURLEmpty()) {
std::vector<size_t> vactionverboffsets;
StringX sxAutotype = PWSAuxParse::GetAutoTypeString(ci.GetAutoType(),
ci.GetGroup(), ci.GetTitle(),
ci.GetUser(),
ci.GetPassword(), ci.GetPreviousPassword(),
ci.GetNotes(), ci.GetURL(), ci.GetEmail(),
vactionverboffsets);
LaunchBrowser(ci.GetURL().c_str(), sxAutotype, vactionverboffsets, bDoAutotype);
if (PWSprefs::GetInstance()->GetPref(PWSprefs::CopyPasswordWhenBrowseToURL)) {
SetClipboardData(ci.GetPassword());
UpdateLastClipboardAction(CItemData::PASSWORD);
}
}
UpdateAccessTime(ci.GetUUID());
}