private void Searcher_FoundInfo(FoundInfoEvent e) { // if app closing if (!_closing) { // Invoke the method "this_FoundInfo" through a delegate, so it is executed in the same thread as MainWindow this.Invoke(FoundInfo, new object[] { e }); } }
private void This_FoundInfo(FoundInfoEvent e) { // Create a new item in the results list CreateResultsListItem(e.Info); }