Пример #1
0
 void StartSearch(string searchTerm)
 {
     if (currentSearch != null)
     {
         currentSearch.Cancel();
     }
     if (string.IsNullOrEmpty(searchTerm))
     {
         currentSearch       = null;
         listBox.ItemsSource = null;
     }
     else
     {
         MainWindow mainWindow = MainWindow.Instance;
         currentSearch = new RunningSearch(mainWindow.CurrentAssemblyList.GetAssemblies(), searchTerm,
                                           (SearchMode)searchModeComboBox.SelectedIndex, mainWindow.CurrentLanguage);
         listBox.ItemsSource = currentSearch.Results;
         new Thread(currentSearch.Run).Start();
     }
 }
Пример #2
0
 void StartSearch(string searchTerm)
 {
     if (currentSearch != null)
     {
         currentSearch.Cancel();
     }
     if (string.IsNullOrEmpty(searchTerm))
     {
         currentSearch       = null;
         listBox.ItemsSource = null;
     }
     else
     {
         MainWindow mainWindow = MainWindow.Instance;
         var        searchType = (SearchType)searchModeComboBox.SelectedItem;
         currentSearch = new RunningSearch(
             mainWindow.AssemblyListTreeNode.Children.Cast <AssemblyTreeNode>(),
             CreateSearchComparer(searchType, searchTerm),
             new FlagsTreeViewNodeFilter(searchType.Flags),
             mainWindow.CurrentLanguage);
         listBox.ItemsSource = currentSearch.Results;
         new Thread(currentSearch.Run).Start();
     }
 }
Пример #3
0
		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();
			}
		}
Пример #4
0
		void StartSearch(string searchTerm)
		{
			if (currentSearch != null) {
				currentSearch.Cancel();
			}
			if (string.IsNullOrEmpty(searchTerm)) {
				currentSearch = null;
				listBox.ItemsSource = null;
			} else {
				MainWindow mainWindow = MainWindow.Instance;
				currentSearch = new RunningSearch(mainWindow.CurrentAssemblyList.GetAssemblies(), searchTerm, searchModeComboBox.SelectedIndex, mainWindow.CurrentLanguage);
				listBox.ItemsSource = currentSearch.Results;
				new Thread(currentSearch.Run).Start();
			}
		}
Пример #5
0
 void StartSearch(string searchTerm)
 {
     if (currentSearch != null) {
         currentSearch.Cancel();
     }
     if (string.IsNullOrEmpty(searchTerm)) {
         currentSearch = null;
         listBox.ItemsSource = null;
     } else {
         MainWindow mainWindow = MainWindow.Instance;
         var searchType = (SearchType)searchModeComboBox.SelectedItem;
         currentSearch = new RunningSearch(
             mainWindow.AssemblyListTreeNode.Children.Cast<AssemblyTreeNode>(),
             CreateSearchComparer(searchType, searchTerm),
             new FlagsTreeViewNodeFilter(searchType.Flags),
             mainWindow.CurrentLanguage);
         listBox.ItemsSource = currentSearch.Results;
         new Thread(currentSearch.Run).Start();
     }
 }
Пример #6
0
		void StartSearch(string searchTerm)
		{
			if (currentSearch != null) {
				currentSearch.Cancel();
			}
			if (string.IsNullOrEmpty(searchTerm)) {
				currentSearch = null;
            listView.ItemsSource = null;
			} else {
				MainWindow mainWindow = MainWindow.Instance;
            LoadedAssembly[] assemblies = null;
            if (checkBoxSearchSelectedAssemblyOnly.IsChecked == true)
            {
               assemblies = GetSelectedAssemblies();
            }
            else
            {
               assemblies = mainWindow.CurrentAssemblyList.GetAssemblies();
            }
				currentSearch = new RunningSearch(assemblies, searchTerm, searchModeComboBox.SelectedIndex, mainWindow.CurrentLanguage);
			   currentSearch.ExactMatch = buttonExactMatch.IsChecked.GetValueOrDefault(false);
            
			   listView.ItemsSource = currentSearch.Results;
				new Thread(currentSearch.Run).Start();
			}
		}