Exemple #1
0
	CopyDialog(NCDialogParent *parent, bool move = false)
	:	SimpleCFThreadWin(parent, move ? _LT("Move") : _LT("Copy") ),
		_layout(7,2), 
		_text1(0, this, utf8_to_unicode(move ? _LT("Moving the file") : _LT("Copying the file") ).ptr()),
		_text2(0, this, utf8_to_unicode( _LT("to") ).ptr()),
		_text3(0, this, utf8_to_unicode( _LT("Files processed") ).ptr()),
		_from(this),
		_to(this),
		_countWin(this), 
		_progressWin(this)
	{
		_layout.AddWin(&_text1, 0, 0, 0, 1);
		_layout.AddWin(&_from, 1, 0, 1, 1);
		_layout.AddWin(&_text2, 2, 0, 2, 1);
		_layout.AddWin(&_to, 3, 0, 3, 1);
		_layout.AddWin(&_progressWin, 4,0,4,1);
		_layout.AddWin(&_text3, 5, 0);
		_layout.AddWin(&_countWin, 5, 1);
		_text1.Show(); _text1.Enable();
		_text2.Show(); _text2.Enable();
		_text3.Show(); _text3.Enable();
		_from.Show(); _from.Enable();
		_to.Show(); _to.Enable();
		_countWin.Show(); _countWin.Enable();
		_progressWin.Show(); _progressWin.Enable();
		AddLayout(&_layout);
		SetPosition();
	}
Exemple #2
0
void CopyDialog::OperThreadSignal(int info)
{
	if (info == INFO_NEXTFILE)
	{
		MutexLock lock(&threadData.infoMutex);
		if (threadData.pathChanged) 
		{
			_from.SetText(threadData.infoSrcUri.GetUnicode());		
			_to.SetText(threadData.infoDstUri.GetUnicode());
			_countWin.SetNumber(threadData.infoCount);
			threadData.pathChanged = false;
		}
		
		if (threadData.progressChanged) 
		{
			_progressWin.SetData(0, threadData.infoSize, threadData.infoProgress);
			threadData.progressChanged = false;
		}
	}
}
Exemple #3
0
	CopyDialog( NCDialogParent* parent, bool move = false )
		:  SimpleCFThreadWin( parent, move ? _LT( "Move" ) : _LT( "Copy" ) ),
		   _layout( 7, 2 ),
		   _text1( 0, this, utf8_to_unicode( move ? _LT( "Moving the file" ) : _LT( "Copying the file" ) ).data() ),
		   _text2( 0, this, utf8_to_unicode( _LT( "to" ) ).data() ),
		   _text3( 0, this, utf8_to_unicode( _LT( "Files processed" ) ).data() ),
		   _from( this ),
		   _to( this ),
		   _countWin( this ),
		   _progressWin( this ),
		   _speedStr( uiValue, this, 0, 0, StaticLine::LEFT, 10 ),
		   _lastMs( GetTickMiliseconds() )
	{
		_layout.AddWin( &_text1, 0, 0, 0, 1 );
		_layout.AddWin( &_from, 1, 0, 1, 1 );
		_layout.AddWin( &_text2, 2, 0, 2, 1 );
		_layout.AddWin( &_to, 3, 0, 3, 1 );
		_layout.AddWin( &_progressWin, 4, 0, 4, 1 );
		_layout.AddWin( &_text3, 5, 0 );
		_layout.AddWin( &_countWin, 5, 1 );
		_layout.AddWin( &_speedStr, 6, 0 );
		_text1.Show();
		_text1.Enable();
		_text2.Show();
		_text2.Enable();
		_text3.Show();
		_text3.Enable();
		_from.Show();
		_from.Enable();
		_to.Show();
		_to.Enable();
		_countWin.Show();
		_countWin.Enable();
		_progressWin.Show();
		_progressWin.Enable();
		_speedStr.Show();
		_speedStr.Enable();
		AddLayout( &_layout );
		SetTimer( 1, 1000 );
		SetPosition();
	}
Exemple #4
0
void DirCalcThreadWin::OperThreadSignal( int info )
{
	RefreshCounters();

	MutexLock lock( &pData->resMutex );

	if ( pData->currentPath.Count() > 0 )
	{
		cPathWin.SetText( pData->currentPath.GetUnicode() );
		pData->currentPath.Clear();
	}
}
Exemple #5
0
void DirCalcThreadWin::OperThreadStopped()
{
	cPathWin.SetText( utf8_to_unicode( _LT( "Scan done" ) ).data() );
	RefreshCounters();
}
Exemple #6
0
	DirCalcThreadWin( NCDialogParent* parent, const char* name, OperDirCalcData* pD, const unicode_t* dirName )
		:  NCDialog( ::createDialogAsChild, 0, parent, utf8_to_unicode( name ).data(), bListOk ),
		   pData( pD ),
		   lo( 12, 10 ),
		   cPathWin( this ),
		   curFileCount( -1 ),
		   curFolderCount( -1 ),
		   curSumSize( -1 ),
		   curBadDirs( -1 ),
		   dirString( 0, this, ScanedDirString( dirName ).data() ),
		   fileCountName( uiVariable, this, utf8_to_unicode( _LT( "Files:" ) ).data() ),
		   fileCountNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() ),
		   folderCountName( uiVariable, this, utf8_to_unicode( _LT( "Folders:" ) ).data() ),
		   folderCountNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() ),
		   sumSizeName( uiVariable, this, utf8_to_unicode( _LT( "Files size:" ) ).data() ),
		   sumSizeNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAAAAAAAAAAAA" ).data() ),
		   badDirsName( uiVariable, this, utf8_to_unicode( _LT( "Not readable folders:" ) ).data() ),
		   badDirsNum( uiValue, this, utf8_to_unicode( "AAAAAAAAAA" ).data() )
	{
		lo.AddWin( &dirString, 0, 0, 0, 3 );
		lo.AddWin( &cPathWin, 9, 0, 9, 3 );
		lo.LineSet( 1, 10 );
		lo.AddWin( &fileCountName, 3, 1 );
		lo.AddWin( &folderCountName, 4, 1 );
		lo.AddWin( &sumSizeName, 5, 1 );
		lo.AddWin( &fileCountNum, 3, 2 );
		lo.AddWin( &folderCountNum, 4, 2 );
		lo.AddWin( &sumSizeNum, 5, 2 );
		lo.LineSet( 6, 7 );
		lo.AddWin( &badDirsName, 7, 1 );
		lo.AddWin( &badDirsNum, 7, 2 );
		lo.LineSet( 8, 10 );

		dirString.Show();
		dirString.Enable();
		cPathWin.Show();
		cPathWin.Enable();
		fileCountName.Show();
		fileCountName.Enable();
		fileCountNum.Show();
		fileCountNum.Enable();

		folderCountName.Show();
		folderCountName.Enable();
		folderCountNum.Show();
		folderCountNum.Enable();

		sumSizeName.Show();
		sumSizeName.Enable();
		sumSizeNum.Show();
		sumSizeNum.Enable();
		badDirsName.Show();
		badDirsName.Enable();
		badDirsNum.Show();
		badDirsNum.Enable();

		lo.SetColGrowth( 3 );
		lo.SetColGrowth( 0 );

		this->AddLayout( &lo );
		this->SetEnterCmd( CMD_OK );
		SetPosition();

		RefreshCounters();
	}