Exemplo n.º 1
0
		private void ProgressChanged(object sender, ProgressChangedEventArgs e)
		{
			if (e.Progress == -1d)
			{
				log.InfoFormat("\r\n\r\n{0}", e.Status);
			}
			else
			{
				log.InfoFormat("{0}% / {1}", e.Progress, e.Status);
			}
		}
Exemplo n.º 2
0
 private void OnProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (ProgressChanged != null)
     {
         var currentProgress = (_currentStep * 100 + Math.Max(0, e.Progress)) / (double)_stepCount;
         if (e.Progress == 100 && e.Status == "OK")
         {
             _currentStep++;
         }
         ProgressChanged(this, new ProgressChangedEventArgs(e.Status, _currentStep == _stepCount ? -1 : currentProgress));
     }
 }
Exemplo n.º 3
0
 private void OnProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     var progress = e.Progress;
     if (progress > 0)
     {
         progress = (100*providersProcessed + progress)/(double)providers.Count;
     }
     if (ProgressChanged != null)
     {
         ProgressChanged(this, new ProgressChangedEventArgs(e.Status, progress, e.Completed));
     }
 }
Exemplo n.º 4
0
 private void OnProgressChanged(object sender, ProgressChangedEventArgs e)
 {
     if (ProgressChanged != null) ProgressChanged(this, e);
 }