private void Searcher_FoundInfo(FoundInfoEventArgs e) { if (!m_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(FoundInfoEventArgs e) { // Create a new item in the results list: CreateResultsListItem(e.Info); }