private void OnProgressUpdate(ProgressUpdateEventArgs e) { if (this.ProgressUpdate != null) { this.ProgressUpdate(this, e); } }
protected void PostProgressUpdate(double completed) { // update progress on every full percent point only // to save resources and cpu if (((int)completed - (int)lastCompleted) < 1) { return; } lastCompleted = completed; SendOrPostCallback cb = delegate(object args) { OnProgressUpdate((ProgressUpdateEventArgs)args); }; ProgressUpdateEventArgs e = new ProgressUpdateEventArgs(completed); asyncOperation.Post(cb, e); }
protected void PostProgressUpdate(double completed) { // update progress on every full percent point only // to save resources and cpu if (((int)completed - (int)lastCompleted) < 1) return; lastCompleted = completed; SendOrPostCallback cb = delegate(object args) { OnProgressUpdate((ProgressUpdateEventArgs)args); }; ProgressUpdateEventArgs e = new ProgressUpdateEventArgs(completed); asyncOperation.Post(cb, e); }
private void OnProgressUpdate(ProgressUpdateEventArgs e) { if (this.ProgressUpdate != null) this.ProgressUpdate(this, e); }
private void OnImportProgressUpdate(object sender, ProgressUpdateEventArgs e) { Application.Invoke(delegate { progress.Fraction = e.Completed / 100.0; progress.Text = string.Format(S._("{0:0}% completed."), e.Completed); }); }