void CDownloadProperties_MirrorsPage::OnCalcmirrspeed() 
{
	CWaitDlg dlg;
	dlg.StartWaiting (LS (L_CALCULATINGMIRRORSSPEED), _threadCalcMirrSpeed, TRUE, this);

	UpdateMirrSpeed ();
	UpdateMirrUsing ();
}
예제 #2
0
BOOL CFlashVideoDownloadsWnd::CreateDownload(LPCSTR pszUrl, bool bTopMostErrMessages)
{
	DWORD dwMB = bTopMostErrMessages ? MB_SYSTEMMODAL : 0;

	if (_App.FlvMonitoring_Enable () == FALSE)
	{
		MessageBox (LS (L_ENABLE_FLVMONITORING_FIRST), NULL, MB_ICONEXCLAMATION | dwMB);
		return FALSE;
	}

	CString strUrl;

	if (pszUrl == NULL || *pszUrl == 0)
	{
		CDlgCreateFlvDownloadsByWebPageUrl dlg;
		if (IDOK != AfxGetApp ()->m_pMainWnd->SendMessage (WM_DOMODAL, 0, (LPARAM)&dlg))
			return FALSE;
		strUrl = dlg.m_strWebPageUrl;
	}
	else
	{
		strUrl = pszUrl;
	}

	CWaitDlg dlgWait;
	HRESULT hrRes;
	dlgWait.StartWaiting (LS (L_SEARCHING_FLVS), _threadPassWebPageUrlToFlvSniffDll, FALSE, (LPVOID)(LPCTSTR)strUrl, (LPVOID)&hrRes);

	if (hrRes != S_OK)
	{
		switch (hrRes)
		{
		case S_FALSE:
			MessageBox (LS (L_NOFLVSFOUND), NULL, MB_ICONEXCLAMATION | dwMB);
			break;

		case E_INVALIDARG:
			MessageBox (LS (L_FLVWEBPAGENOTFOUND), NULL, MB_ICONEXCLAMATION | dwMB);
			break;

		default:
			CString str;
			str.Format (LS (L_ERRGETFLVDLDS), hrRes);
			MessageBox (str, LS (L_ERROR), MB_ICONERROR | dwMB);
			break;
		}
	}

	return hrRes == S_OK;

	
}
예제 #3
0
void CDownloads_History::ApplyFilter(fsDldHistRecFilter* filter)
{
	if (filter == NULL)
	{
		DeleteAllRecords ();
		return;
	}

	if (m_mgr->GetRecordCount () < 600)	
		ApplyFilter_imp (filter);	
	else
	{
		
		CWaitDlg dlg;
		dlg.StartWaiting (LS (L_BUILDINGLISTOFHISTORY), _threadApplyFilter, FALSE, this, filter);
	}
}
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);
}
예제 #5
0
void CCreateBatchDownload::OnQuerysize() 
{
	if (FALSE == CheckUrl ())
		return;

	if (FALSE == ReadAuth ())
		return;

	
	if (m_bBLParametersChanged)
	{
		if (FALSE == BuildBatchList ())
			return;

		m_pvDownloads = GenerateDownloads ();
	}

	CWaitDlg dlg;	
	dlg.StartWaiting (LS (L_QUERINGSIZE), _threadCalcSize, TRUE, this, &dlg);
}
void CDownloadProperties_MirrorsPage::OnFindmirrors() 
{
	if (m_dld->pMgr->GetDownloadMgr ()->GetDownloader ()->IsMirrSearchPerformed ())
	{
		MessageBox (LS (L_MIRRSEARCHPERFORMEDALREADY), LS (L_DONE), MB_ICONEXCLAMATION);
		return;
	}

	CWaitDlg dlg;
	dlg.StartWaiting (LS (L_SEARCHINGFORMIRRORS), _threadFindMirrors, TRUE, this);

	FullUpdateMirrList ();

	if (m_dld->pMgr->GetDownloadMgr ()->GetDownloader ()->GetFoundMirrorCount ())
	{
		char sz [10000];
		sprintf (sz, LS (L_NMIRRORSFOUND), m_dld->pMgr->GetDownloadMgr ()->GetDownloader ()->GetFoundMirrorCount ());
		MessageBox (sz, LS (L_DONE));
		CancelToClose ();
	}
	else
		MessageBox (LS (L_NOMIRRORSFOUND), LS (L_DONE));
}