private void OnIOFinished(IOEventArgs e) { if (IOFinished != null) { IOFinished(this, e); } }
public void IOEventHandler(object sender, IOEventArgs e) { double percent; lock (this) { totalBytes += (long)e.Count; percent = Math.Max(0.0, Math.Min(100.0, ((double)totalBytes * 100.0) / (double)maxBytes)); } callback(sender, new ProgressEventArgs(percent)); }