private void Searcher_ThreadEnded(ThreadEndedEvent e) { // if app closing if (!_closing) { // Invoke the method "this_ThreadEnded" through a delegate, so it is executed in the same thread as MainWindow this.Invoke(ThreadEnded, new object[] { e }); } }
private void This_ThreadEnded(ThreadEndedEvent e) { EnableAllExpStop(); }