void HandleIndexerProgress(object sender, ProgressEventArgs e) { int percentage = (int)((double)e.CurrentPosition / e.FileSize * 100); if (percentage != progressBar.Value) { progressBar.Value = percentage; lblStatus.Text = "loaded " + e.CurrentPosition + " of " + e.FileSize + " bytes"; Application.DoEvents(); // dirty hack for not having to program async } }
private void HandleIndexerProgress(object sender, ProgressEventArgs e) { OnProgress(_currentFile, _currentOperation, e.FileSize, e.CurrentPosition); }