private void btReindexCorpus_Click(object sender, RoutedEventArgs e) { Indexation_ViewModel indexation_vm = new Indexation_ViewModel(indexer_worker); indexer_worker.RunWorkerAsync(new Tuple <Corpora_ViewModel, Indexation_ViewModel>((Corpora_ViewModel)DataContext, indexation_vm)); busy_with_indexing = new BusyWithIndexing(indexation_vm); busy_with_indexing.Owner = this; busy_with_indexing.ShowDialog(); }
private void indexer_worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs args) { busy_with_indexing.Close(); busy_with_indexing = null; }