Esempio n. 1
0
void CSpiderTaskTree::UpdateDownload(vmsDownloadSmartPtr dld)
{
	int iIndex = FindDownload (dld);
	if (iIndex == -1)
		return;

	int iImage = GetDownloadImage (m_vConfs [iIndex].wptree->GetData ());
	SetItemImage (m_vConfs [iIndex].hItem, iImage, iImage);
}
Esempio n. 2
0
void CSpiderTaskTree::OnDldWillBeDeleted(vmsDownloadSmartPtr dld)
{
	int iIndex = FindDownload (dld);
	if (iIndex == -1)
		return;

	int iImage = dld->pMgr->IsDone () ? 1 : 6;
	SetItemImage (m_vConfs [iIndex].hItem, iImage, iImage);
}
Esempio n. 3
0
void CDownloads_Deleted::SelectDownload(vmsDownloadSmartPtr dld)
{
	int iItem = FindDownload (dld);

	if (iItem == -1)
		return;

	POSITION pos = GetFirstSelectedItemPosition ();
	
	while (pos)
		SetItemState (GetNextSelectedItem (pos), 0, LVIS_SELECTED | LVIS_FOCUSED);

	
	SetItemState (iItem, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
	SetSelectionMark (iItem);
	EnsureVisible (iItem, FALSE);
}
void vmsMediaConvertMgr::ConvertMediaFile(vmsDownloadSmartPtr dld, vmsMediaConvertMgr_OptionsSource enOs)
{
	vmsConvertMediaFileContext *pcmfc = new vmsConvertMediaFileContext;

	if (enOs == MCM_OS_SEARCH_IN_MGR)
	{
		int nIndex = FindDownload (dld);
		if (nIndex == -1)
			return;

		vmsConvertMediaFileContext* ctx = (vmsConvertMediaFileContext*)m_vTasks [nIndex];
		if (ctx == 0)
			return;
		pcmfc->dld = ctx->dld;	
		pcmfc->stgs = ctx->stgs;
		
		
		m_vTasks.erase (m_vTasks.begin () + nIndex);
		setDirty();
		getPersistObjectChildren ()->removePersistObject (nIndex);
		
		
	}
	else
	{
		pcmfc->dld = dld;
		GetDefaultSettings (pcmfc->stgs);

		if (enOs == MCM_OS_SHOW_OPTIONS_UI)
		{
			CDlg_Convert dlg (&pcmfc->stgs);
			if (IDOK != _DlgMgr.DoModal (&dlg))
			{
				delete pcmfc;
				return;
			}
		}
	}

	CWaitDlg *dlg = new CWaitDlg;
	dlg->StartWaiting (LS (L_CONVERTING), _threadConvertMediaFile, TRUE, pcmfc, 
		(LPVOID)(enOs == MCM_OS_SHOW_OPTIONS_UI), 
		NULL, NULL, NULL, NULL, FALSE);
}
Esempio n. 5
0
void CDownloads_Deleted::RemoveDownload(vmsDownloadSmartPtr dld)
{
	int iItem = FindDownload (dld);
	if (iItem != -1)
		DeleteItem (iItem);
}