当前位置: 首页>>代码示例>>C++>>正文


C++ item::ItemInfoI类代码示例

本文整理汇总了C++中usercore::item::ItemInfoI的典型用法代码示例。如果您正苦于以下问题:C++ ItemInfoI类的具体用法?C++ ItemInfoI怎么用?C++ ItemInfoI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ItemInfoI类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: onItemChanged

void TaskBarIcon::onItemChanged(UserCore::Item::ItemInfoI::ItemInfo_s& info)
{
	if (!GetUserCore())
		return;

	if (info.changeFlags & UserCore::Item::ItemInfoI::CHANGED_STATUS)
	{
		UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo(info.id);
	
		if (!item)
			return;

		if (item->getStatus() & UserCore::Item::ItemInfoI::STATUS_UPDATEAVAL)
		{
			if (!findUpdateItem(item))
				m_vNextUpdateList.push_back(item);
		}
		else
		{
			removeUpdateItem(item);
		}
	}

	updateIcon();
}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:25,代码来源:TaskBarIcon_Ballon.cpp

示例2: onChoice

void InstallBranch::onChoice(wxCommandEvent& event)
{
	MCFBranch b = getBranch();

	if (b == UINT_MAX || b == (UINT_MAX - 1))
	{
		if (b == UINT_MAX)
			m_butInstall->SetLabel(Managers::GetString(L"#PLAY"));
		else
			m_butInstall->SetLabel(Managers::GetString(L"#FIND"));

		m_butInstall->Enable(true);
		return;
	}

	UserCore::Item::ItemInfoI* pItemInfo = GetUserCore()->getItemManager()->findItemInfo(m_Item);

	if ((m_bIsMod || m_bIsExpansion) && !m_bSelectBranch)
		pItemInfo = GetUserCore()->getItemManager()->findItemInfo(pItemInfo->getParentId());

	UserCore::Item::BranchInfoI* bi = pItemInfo->getBranchById(b);

	m_bBuy = (!(bi->getFlags()&UserCore::Item::BranchInfoI::BF_ONACCOUNT) && !(bi->getFlags()&UserCore::Item::BranchInfoI::BF_FREE));

	if (m_bBuy)
		m_butInstall->SetLabel(Managers::GetString(L"#PURCHASE"));
	else
		m_butInstall->SetLabel(Managers::GetString(L"#INSTALL"));

	bool noRelease = HasAllFlags(bi->getFlags(), UserCore::Item::BranchInfoI::BF_NORELEASES);
	bool isPreorder = bi->isPreOrder();
	bool onAccount = HasAllFlags(bi->getFlags(), UserCore::Item::BranchInfoI::BF_ONACCOUNT);

	m_butInstall->Enable(!(noRelease && isPreorder && onAccount));
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:35,代码来源:InstallBranch.cpp

示例3: onButtonPressed

void UpdateInfoForm::onButtonPressed(wxCommandEvent& event)
{
	Close();

	UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo( m_uiInternId );

	if (!item)
		return;

	if (m_bLaunch)
	{
		if (item)
		{
			if (m_cbReminder->IsChecked())
				item->addOFlag(UserCore::Item::ItemInfoI::OPTION_NOTREMINDUPDATE);
			else
				item->delOFlag(UserCore::Item::ItemInfoI::OPTION_NOTREMINDUPDATE);
		}
	}

	if (event.GetId() == m_butUpdate->GetId())
	{
		g_pMainApp->handleInternalLink(m_uiInternId, ACTION_UPDATE, FormatArgs("show=true"));
	}
	else if (event.GetId() == m_butLaunch->GetId())
	{
		g_pMainApp->handleInternalLink(m_uiInternId, ACTION_LAUNCH, FormatArgs("noupdate"));
	}
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:29,代码来源:ItemUpdateForm.cpp

示例4: onUploadTrigger

void InternalLink::onUploadTrigger(ut& info)
{
	FINDFORM(info.id, UploadMCFForm);

	UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo( info.id );
	if (!item && !GetUserCore()->isAdmin())
	{
		//cant upload show prompt
		gcMessageBox(g_pMainApp->getMainWindow(), Managers::GetString(L"#MF_NONDEV_ERROR"), Managers::GetString(L"#MF_PERMISSION_ERRTITLE"));
		return;
	}

	if (item && !HasAllFlags(item->getStatus(), UserCore::Item::ItemInfoI::STATUS_DEVELOPER) && !GetUserCore()->isAdmin())
	{
		//cant upload show prompt
		gcMessageBox(g_pMainApp->getMainWindow(), Managers::GetString(L"#MF_UPERMISSION_ERROR"), Managers::GetString(L"#MF_PERMISSION_ERRTITLE"));
		return;
	}

	//create new create from
	UploadMCFForm* form = new UploadMCFForm(m_pParent);
	form->setInfo_path(info.id, info.path.c_str());

	if (info.caller)
	{
		wxPoint pos = info.caller->GetScreenPosition();
		form->SetPosition(pos);
	}

	form->Show(true);	
	form->Raise();
	form->run();

	m_vSubForms.push_back(form);
}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:35,代码来源:InternalLink.cpp

示例5: if

	PreloadButtonHelper(DesuraId id)
	{
		m_Id = id;

		UserCore::Item::ItemInfoI* item = GetUserCore()->getItemManager()->findItemInfo(id);

		if (!item)
			return;

		for (size_t x=0; x<item->getBranchCount(); x++)
		{
			uint32 flags = item->getBranch(x)->getFlags();
			
			if (HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_NORELEASES))
				continue;

			if (item->getBranch(x)->isPreOrder())
				continue;

			bool isDemo = HasAnyFlags(flags, UserCore::Item::BranchInfoI::BF_DEMO|UserCore::Item::BranchInfoI::BF_TEST);
			bool onAccount = HasAnyFlags(flags, UserCore::Item::BranchInfoI::BF_FREE|UserCore::Item::BranchInfoI::BF_ONACCOUNT);
			bool isLocked = HasAnyFlags(flags, UserCore::Item::BranchInfoI::BF_REGIONLOCK|UserCore::Item::BranchInfoI::BF_MEMBERLOCK);

			if (isDemo)
				m_DemoBranch = item->getBranch(x)->getBranchId();
			else if (onAccount && !isLocked)
				m_bOtherBranches = true;
		}
	}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:29,代码来源:InternalLink.cpp

示例6: setInfo

void CreateMCFOverview::setInfo(DesuraId itemId, const char* szPath)
{
	UserCore::Item::ItemInfoI *item = GetUserCore()->getItemManager()->findItemInfo(itemId);
	
	if (!item && !GetUserCore()->isAdmin())
	{	
		GetParent()->Close();
		return;
	}

	BasePage::setInfo(itemId);
	
	if (item)
		m_labInfo->SetLabel(gcWString(Managers::GetString(L"#CF_COMPLETE"), item->getName()));

	UTIL::FS::Path path(szPath, "", true);
	uint64 filesize = UTIL::FS::getFileSize(path);

	m_szFolderPath = path.getFolderPath();
	m_szPath = path.getFullPath();
	m_pItem = item;

	m_labName->SetLabel(path.getFile().getFile());
	m_labSize->SetLabel(UTIL::MISC::niceSizeStr(filesize));
	m_labPath->SetLabel(path.getShortPath(45, true));
	m_labPath->SetToolTip(path.getFullPath());

	Layout();
}
开发者ID:BlastarIndia,项目名称:Desurium,代码行数:29,代码来源:CreateOVPage.cpp

示例7: pollUpdates

bool UpdateThreadOld::pollUpdates()
{
	if (!m_pWebCore || !m_pUser)
		return false;

	updateBuildVer();

	std::map<std::string, std::string> post;

#ifdef DESURA_NONGPL_BUILD
	post["appid"] = gcString("{0}", m_iAppId);
	post["build"] = gcString("{0}", m_iAppVersion);
#endif

	for (uint32 x=0; x< m_pUser->getItemManager()->getCount(); x++)
	{
		UserCore::Item::ItemInfoI* item = m_pUser->getItemManager()->getItemInfo(x);

		if (!item)
			continue;

		if (!(item->getStatus() & UserCore::Item::ItemInfoI::STATUS_ONCOMPUTER) || (item->getStatus()&UserCore::Item::ItemInfoI::STATUS_ONACCOUNT))
			continue;

		DesuraId id = item->getId();

		if (id.getType() == DesuraId::TYPE_LINK)
			continue;

		gcString key("updates[{0}][{1}]", id.getTypeString().c_str(), id.getItem());
		post[key] = "1";
	}

	TiXmlDocument doc;

	try
	{
		m_pWebCore->getUpdatePoll(doc, post);
	}
	catch (gcException &e)
	{
		Warning(gcString("Update poll failed: {0}\n", e));
		return false;
	}

	parseXML(doc);

#ifdef WIN32
	checkFreeSpace();
#endif

	m_hHttpHandle->cleanPostInfo();
	m_hHttpHandle->cleanUp();
	m_hHttpHandle->clearCookies();

	return true;
}
开发者ID:darthlukan,项目名称:Desurium,代码行数:57,代码来源:UpdateThread_Old.cpp

示例8: onButtonClicked

void CDKInfo::onButtonClicked(wxCommandEvent& event)
{
	if (event.GetId() == m_butClose->GetId())
	{
		GetParent()->Close();
	}
	else if (event.GetId() == m_imgCopyAll->GetId() || (m_vSplitKey.size() == 0 && event.GetId() == m_imgCopyPart->GetId()))
	{
		if (wxTheClipboard->Open())
		{
			wxTheClipboard->SetData(new wxTextDataObject(m_tbCdKey->GetValue()));
			wxTheClipboard->Close();
		}	

		m_tbCdKey->SetSelection(-1,-1);
	}
	else if (event.GetId() == m_imgCopyPart->GetId())
	{
		SplitInfo *info = m_vSplitKey[m_uiCurIndex];

		m_uiCurIndex++;

		if (m_uiCurIndex >= m_vSplitKey.size())
			m_uiCurIndex = 0;
		
		if (wxTheClipboard->Open())
		{
			wxTheClipboard->SetData(new wxTextDataObject(info->text));
			wxTheClipboard->Close();
		}

		m_tbCdKey->SetSelection(info->start,info->end);

		gcString label(Managers::GetString("#CDK_COPYPART"));

		if (m_uiCurIndex != 0)
			label = gcString(Managers::GetString("#CDK_COPYPART_X"), m_uiCurIndex+1);

		m_imgCopyPart->SetToolTip(label);
	}
	else if (m_butLaunch && m_butLaunch->GetId() == event.GetId())
	{
		g_pMainApp->handleInternalLink(getItemId(), ACTION_LAUNCH, FormatArgs("cdkey", std::string("exe=") + m_szExe));
		GetParent()->Close();
	}
	else if (m_butActivate && m_butActivate->GetId() == event.GetId())
	{
		UserCore::Item::ItemInfoI* info = getItemInfo();

		if (info && info->isLaunchable())
			info->addSFlag(UserCore::Item::ItemInfoI::STATUS_LAUNCHED);

#ifdef WIN32
		UTIL::WIN::runAs("steam://open/activateproduct");
#endif
	}
}
开发者ID:boskee,项目名称:Desurium-1,代码行数:57,代码来源:CDKInfo.cpp

示例9: onButtonClick

void InstallBranch::onButtonClick(wxCommandEvent &event)
{
	if (event.GetId() == m_butInfo->GetId())
	{
		if ((m_bIsMod || m_bIsExpansion) && !m_bSelectBranch)
			g_pMainApp->handleInternalLink(m_Item, ACTION_PROFILE, FormatArgs("?help=needgame"));
		else
			g_pMainApp->handleInternalLink(m_Item, ACTION_PROFILE, FormatArgs("?help=branches"));

		EndModal(wxID_CANCEL);
	}
	else if (event.GetId() == m_butInstall->GetId())
	{
		MCFBranch b = getBranch();

		if (b == UINT_MAX)
		{
			UserCore::Item::ItemInfoI* pItemInfo = GetUserCore()->getItemManager()->findItemInfo(m_Item);

			if ((m_bIsMod || m_bIsExpansion) && !m_bSelectBranch)
				pItemInfo = GetUserCore()->getItemManager()->findItemInfo(pItemInfo->getParentId());

			pItemInfo->addSFlag(UserCore::Item::ItemInfoI::STATUS_LINK|UserCore::Item::ItemInfoI::STATUS_INSTALLED|UserCore::Item::ItemInfoI::STATUS_READY);
			EndModal(wxID_OK);
		}
		else if (b == (UINT_MAX - 1))
		{
			g_pMainApp->handleInternalLink(m_Item, ACTION_SHOWSETTINGS, FormatArgs("tab=cip"));
			EndModal(wxID_CANCEL);
		}
		else if (m_bBuy)
		{
			MCFBranch g = getGlobal();
			gcString args;

			if (g == 0 || !g.isGlobal())
				args = gcString("?help=buy&branch={0}", b);
			else
				args = gcString("?help=buy&branchglobal={0}", g);
			
			g_pMainApp->handleInternalLink(m_Item, ACTION_PROFILE, FormatArgs(args));
			EndModal(wxID_CANCEL);
		}
		else
		{
			EndModal(wxID_OK);
		}
	}
	else if (event.GetId() == m_butCancel->GetId())
	{
		EndModal(wxID_CANCEL);
	}
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:53,代码来源:InstallBranch.cpp

示例10: setInfo

void ComplexPrompt::setInfo(DesuraId id)
{
	UserCore::Item::ItemInfoI *item = GetUserCore()->getItemManager()->findItemInfo(id);

	if (!item)
	{
		EndModal(wxID_CANCEL);
		return;
	}

	m_labInfo->SetLabel(gcWString(Managers::GetString(L"#IF_CONFLICT"), item->getName()));
	m_labInfo->Wrap( 350 );
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:13,代码来源:ComplexPrompt.cpp

示例11: init

void InstallVerifyInfoPage::init()
{
	UserCore::Item::ItemInfoI *info = getItemInfo();

	if (!info)
	{
		Close();
		return;
	}

	m_labInfo->SetLabel(gcWString(Managers::GetString(L"#IF_VERIFYCONFIRM"), info->getName()));
	m_labInfo->Wrap( 360 );
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:13,代码来源:InstallVInfoPage.cpp

示例12: setInfo

void CDKeyForm::setInfo(DesuraId id)
{
	m_ItemId = id;

	UserCore::Item::ItemInfoI *item = m_pItemManager->findItemInfo(id);

	if (!item)
	{	
		Close();
		return;
	}

	this->SetTitle(gcString(Managers::GetString("#CDK_TITLE"), item->getName()));

	m_pPage->setInfo(m_ItemId);
	m_pPage->run();
}
开发者ID:CSRedRat,项目名称:desura-app,代码行数:17,代码来源:CDKeyForm.cpp

示例13: setInfo

void CDKeyForm::setInfo(DesuraId id)
{
	m_ItemId = id;

	UserCore::Item::ItemInfoI *item = GetUserCore()->getItemManager()->findItemInfo(id);

	if (!item)
	{	
		Close();
		return;
	}

	this->SetTitle(gcString("{0}: CD Key", item->getName()));

	m_pPage->setInfo(m_ItemId);
	m_pPage->run();
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:17,代码来源:CDKeyForm.cpp

示例14: setInfo

void UninstallForm::setInfo(DesuraId id)
{
	m_uiInternId = id;
	UserCore::Item::ItemInfoI *item = GetUserCore()->getItemManager()->findItemInfo(id);

	if (!item)
	{
		Warning("Item was null for uninstall!");
		Close();
	}

	gcWString name(item->getName());

	gcWString title(255, L"{0} {0}", GETSTRING(L"#UNF_TITLE"), name.c_str());
	this->SetTitle(title.c_str());

	showInfo();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:18,代码来源:UninstallForm.cpp

示例15: resetAllValues

void UploadInfoPage::resetAllValues()
{
	//m_dpFile->SetPath(wxT(""));
	m_butUpload->Enable( false );

	UserCore::Item::ItemInfoI *item = GetUserCore()->getItemManager()->findItemInfo(getItemId());

	gcString filePath;
	gcString cachePath = GetUserCore()->getMcfCachePath();

	if (!item)
		filePath = gcString("{0}{1}temp{1}", cachePath, DIRS_STR);
	else
		filePath = gcString("{0}{2}{1}", cachePath, item->getId().getFolderPathExtension().c_str(), DIRS_STR);

	gcWString wfilePath(filePath);
	m_tbItemFile->SetValue(wfilePath.c_str());
}
开发者ID:Alasaad,项目名称:Desurium,代码行数:18,代码来源:UploadInfoPage.cpp


注:本文中的usercore::item::ItemInfoI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。