void PhotoOrganizer_FileFinished(object sender, PhotoEventArgs e) { Task.Factory.StartNew(() => { this.ProcessedCount++; }, CancellationToken.None, TaskCreationOptions.None, this._foregroundTaskScheduler) .Wait(); }
void PhotoOrganizer_FileStarted(object sender, PhotoEventArgs e) { Task.Factory.StartNew(() => { this.CurrentFile = e.FileName; }, CancellationToken.None, TaskCreationOptions.None, this._foregroundTaskScheduler) .Wait(); }