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


C++ DLDS_LIST::size方法代码示例

本文整理汇总了C++中DLDS_LIST::size方法的典型用法代码示例。如果您正苦于以下问题:C++ DLDS_LIST::size方法的具体用法?C++ DLDS_LIST::size怎么用?C++ DLDS_LIST::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DLDS_LIST的用法示例。


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

示例1: ShowSelectedDldsProperties

void CFVDownloads_Tasks::ShowSelectedDldsProperties()
{
	POSITION pos = GetFirstSelectedItemPosition ();
	DLDS_LIST vDlds;
	DLDS_LIST vBtDlds;

	if (pos == NULL)
		return;

	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = m_vDlds [iItem];
		if (dld->pMgr->GetDownloadMgr () != NULL)
			vDlds.push_back (dld);
		else if (dld->pMgr->GetBtDownloadMgr () != NULL)
			vBtDlds.push_back (dld);
	}

	if (vDlds.size () >= vBtDlds.size ())
		_pwndDownloads->OnDownloadProperties (vDlds);
	else
		_pwndDownloads->OnBtDownloadProperties (vBtDlds);

	SetFocus ();
}
开发者ID:naroya,项目名称:freedownload,代码行数:26,代码来源:FVDownloads_Tasks.cpp

示例2: OnDeletedDelete

void CDownloads_Deleted::OnDeletedDelete()
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = (fsDownload*) GetItemData (iItem);
		v.push_back (dld);
	}

	if (v.size ())
	{
		if (IDYES == MessageBox (LS (L_AREYOUSURE), LS (L_CONFIRMATION), MB_ICONQUESTION | MB_YESNO))
		{
			if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
				_pwndDownloads->m_wndDeleted.ShowWindow (SW_HIDE);
			try {
				_DldsMgr.DeleteDeletedDownloads (v);
			}
			catch (...) {}
			if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
				_pwndDownloads->m_wndDeleted.ShowWindow (SW_SHOW);
		}
	}
}
开发者ID:pedia,项目名称:raidget,代码行数:26,代码来源:downloads_deleted.cpp

示例3: OnCreate

int CFlashVideoDownloadsWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CWnd::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	m_wndTasks.Create (this);
	m_wndPreview.Create (this);

	m_splitter.Create (AfxGetInstanceHandle (), m_hWnd, WST_HORIZONTAL);
	m_splitter.SetWnd1 (m_wndTasks.m_hWnd);
	m_splitter.SetWnd2 (m_wndPreview.m_hWnd);
	m_splitter.SetMinDimensions (50, 50);
	float fRatio = _App.View_SplitterRatio ("FVDownloads_DL_PREVIEW");
	if (fRatio < 0.1f)
		fRatio = 0.1f;
	m_splitter.SetRatio (fRatio);

	m_wndPreview.ShowWindow (SW_SHOW);

	DLDS_LIST v;

	_DldsMgr.LockList (true);
	size_t nCount = _DldsMgr.GetCount ();
	for (size_t i = 0; i < nCount; i++)
	{
		if (_DldsMgr.GetDownload (i)->dwFlags & DLD_FLASH_VIDEO)
			v.push_back (_DldsMgr.GetDownload (i));
	}
	_DldsMgr.UnlockList (true);

	for (size_t i = 0; i < v.size (); i++)
		m_wndTasks.AddDownload (v [i], TRUE);
	
	return 0;
}
开发者ID:DragonZX,项目名称:fdm2,代码行数:35,代码来源:FlashVideoDownloadsWnd.cpp

示例4: OnBtdldAutostart

void CTorrents_Tasks::OnBtdldAutostart() 
{
	DLDS_LIST v;
	GetSelectedDownloads (v);
	if (v.size () == 0)
		return;
	
	BOOL b = TRUE;
	vmsDownloadsListHelper::GetStat (v, NULL, NULL, NULL, NULL, &b);
	
	for (size_t i = 0; i < v.size (); i++)
		v [i]->bAutoStart = b;	
	
	_pwndDownloads->UpdateAllDownloads ();
	_DldsMgr.ProcessDownloads ();	
}
开发者ID:naroya,项目名称:fdm,代码行数:16,代码来源:Torrents_Tasks.cpp

示例5: OnFvdldAutostart

void CFVDownloads_Tasks::OnFvdldAutostart() 
{
	DLDS_LIST v;
	GetSelectedDownloads (v);
	if (v.size () == 0)
		return;

	BOOL b = TRUE;
	vmsDownloadsListHelper::GetStat (v, NULL, NULL, NULL, NULL, &b);

	for (size_t i = 0; i < v.size (); i++) {
		v [i]->bAutoStart = b;
		v [i]->setDirty();
	}

	_pwndDownloads->UpdateAllDownloads ();
	_DldsMgr.setNeedProcessDownloads ();
}
开发者ID:naroya,项目名称:freedownload,代码行数:18,代码来源:FVDownloads_Tasks.cpp

示例6: OnFvdldPasstodlds

void CFVDownloads_Tasks::OnFvdldPasstodlds() 
{
	DLDS_LIST v;
	GetSelectedDownloads (v);
	if (v.size ())
	{
		_pwndDownloads->ShowDownloads (v);
		((CMainFrame*)AfxGetApp ()->m_pMainWnd)->SetActivePlugin (0);
	}
}
开发者ID:naroya,项目名称:freedownload,代码行数:10,代码来源:FVDownloads_Tasks.cpp

示例7: DeleteSelected

void CFVDownloads_Tasks::DeleteSelected(BOOL bDontConfirmFileDeleting)
{
	if (bDontConfirmFileDeleting || _App.Deleted_ConfirmDeletion ())
	if (IDNO == MessageBox (bDontConfirmFileDeleting ? LS (L_DLDWBDELETEDFROMDISK) : LS (L_AREYOUSURE), LS (L_CONFIRMATION), MB_YESNO|MB_ICONQUESTION))
	{
		SetFocus ();
		return;
	}

	DLDS_LIST v;
	GetSelectedDownloads (v);
	if (v.size () == 0)
		return;

	_pwndDownloads->DeleteDownloads (v, TRUE, bDontConfirmFileDeleting);
	UpdateActiveDownload (0);
}
开发者ID:naroya,项目名称:freedownload,代码行数:17,代码来源:FVDownloads_Tasks.cpp

示例8: OnBtdldStop

void CTorrents_Tasks::OnBtdldStop() 
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int nItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = m_vDlds [nItem];
		if (dld->pMgr->IsRunning ())
			v.push_back (dld);
		else if (dld->bAutoStart)
		{
			dld->bAutoStart = FALSE;
			_pwndDownloads->UpdateDownload (dld);
		}
	}
	if (v.size ())
		_DldsMgr.StopDownloads (v, TRUE);	
}
开发者ID:naroya,项目名称:fdm,代码行数:19,代码来源:Torrents_Tasks.cpp

示例9: OnDeletedRestore

void CDownloads_Deleted::OnDeletedRestore()
{
	DLDS_LIST v;
	POSITION pos = GetFirstSelectedItemPosition ();
	while (pos)
	{
		int iItem = GetNextSelectedItem (pos);
		vmsDownloadSmartPtr dld = (fsDownload*) GetItemData (iItem);
		v.push_back (dld);
	}

	if (v.size ())
	{
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_HIDE);
		try {
			_DldsMgr.RestoreDownloads (v);
		}
		catch (...) {}
		if (_pwndDownloads->Get_DWWN () == DWWN_DELETED)
			_pwndDownloads->m_wndDeleted.ShowWindow (SW_SHOW);
	}	
}
开发者ID:pedia,项目名称:raidget,代码行数:23,代码来源:downloads_deleted.cpp


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