本文整理汇总了C++中CDownload::GetProgress方法的典型用法代码示例。如果您正苦于以下问题:C++ CDownload::GetProgress方法的具体用法?C++ CDownload::GetProgress怎么用?C++ CDownload::GetProgress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CDownload
的用法示例。
在下文中一共展示了CDownload::GetProgress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: PageDownloads
//.........这里部分代码省略.........
}
else if ( strAction == L"clear" )
{
if ( pDownload->IsCompleted() && ! pDownload->IsPreviewVisible() )
{
pDownload->Remove();
continue;
}
}
else if ( strAction == L"more_sources" )
{
// roo_koo_too improvement
pDownload->FindMoreSources();
}
}
if ( CDownloadsCtrl::IsFiltered( pDownload ) ) continue;
CDownloadGroup* pGroup = NULL;
for ( POSITION posGroup = DownloadGroups.GetIterator(); posGroup != NULL; )
{
pGroup = DownloadGroups.GetNext( posGroup );
if ( pGroup->m_bRemoteSelected && pGroup->Contains( pDownload ) ) break;
pGroup = NULL;
}
if ( pGroup == NULL ) continue;
Add( L"download_id", strDownloadID );
Add( L"download_filename", pDownload->GetDisplayName() );
Add( L"download_size", ( pDownload->m_nSize == SIZE_UNKNOWN ) ?
LoadString( IDS_STATUS_UNKNOWN ) : Settings.SmartVolume( pDownload->m_nSize ) );
int nProgress = int( pDownload->GetProgress() );
str.Format( L"%i", nProgress );
Add( L"download_percent", str );
str.Format( L"%i", 100 - nProgress );
Add( L"download_percent_inverse", str );
Add( L"download_speed", Settings.SmartSpeed( pDownload->GetMeasuredSpeed() ) );
if ( CDownloadsCtrl::IsExpandable( pDownload ) )
{
if ( pDownload->m_bExpanded )
Add( L"download_is_expanded", L"true" );
else
Add( L"download_is_collapsed", L"true" );
}
if ( pDownload->IsCompleted() )
Add( L"download_is_complete", L"true" );
else if ( pDownload->IsPaused() )
Add( L"download_is_paused", L"true" );
Add( L"download_status", pDownload->GetDownloadStatus() );
Add( L"download_sources", pDownload->GetDownloadSources() );
Output( L"downloadsDownload" );
if ( pDownload->m_bExpanded && CDownloadsCtrl::IsExpandable( pDownload ) )
{
for ( POSITION posSource = pDownload->GetIterator(); posSource; )
{
CDownloadSource* pSource = pDownload->GetNext( posSource );
ASSERT( pSource->m_pDownload == pDownload );
CString strSourceID;
strSourceID.Format( L"%p", pSource );