void StartSearch(string searchTerm) { if (currentSearch != null) { currentSearch.Cancel(); } if (string.IsNullOrEmpty(searchTerm)) { currentSearch = null; SearchItemsSource = null; } else { currentSearch = new RunningSearch(AssemblyListTreeNode.Children.Cast <AssemblyTreeNode>(), RunningSearch.CreateSearchComparer(searchTerm), filter, Language); SearchItemsSource = currentSearch.Results; new Thread(currentSearch.Run).Start(); } }
void StartSearch(string searchTerm) { TooManyResults = false; if (currentSearch != null) { currentSearch.Cancel(); } if (string.IsNullOrEmpty(searchTerm)) { currentSearch = null; SearchItemsSource = null; } else { currentSearch = new RunningSearch(DnSpyFileListTreeNode.Children.Cast <AssemblyTreeNode>(), RunningSearch.CreateSearchComparer(searchTerm), filter, Language); SearchItemsSource = currentSearch.Results; currentSearch.OnSearchEnded += RunningSearch_OnSearchEnded; new Thread(currentSearch.Run).Start(); } }