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
	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 #3
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;
		}
	}
}