private void RunGetSetsWorker() { using (_getSetsWorker = new BackgroundWorker()) { _getSetsWorker.WorkerSupportsCancellation = true; _getSetsWorker.DoWork += (o, args) => { Messaging.Talk("Finding similar images..."); SafeUpdate(() => imageSetsListbox.Items.Clear()); var options = _formSettingsService.GetFormOptions(this); _controller.FindSimilarImages(options); }; _getSetsWorker.RunWorkerCompleted += (o, args) => { Messaging.Talk("Finished finding similar images..."); FillImageGroupsListBox(_imageStatService.ImageSets.Cast <object>().ToArray()); RunCleanStatsWorker(); }; _getSetsWorker.RunWorkerAsync(); } }