Ejemplo n.º 1
0
        void ShowSearchResults(string pattern, IList <SearchResultMatch> results)
        {
            RemoveSpecialPanel();

            this.curPattern = pattern;
            this.curResults = results;
            if (results == null)
            {
                return;
            }
            resultTreeView.BeginUpdate();
            resultTreeView.Nodes.Clear();

            switch (ViewMode)
            {
            case SearchResultPanelViewMode.PerFile:
                ShowSearchResultsPerFile();
                break;

            case SearchResultPanelViewMode.Flat:
                ShowSearchResultsFlat();
                break;
            }


            resultTreeView.EndUpdate();
        }
Ejemplo n.º 2
0
 public void StartSearch()
 {
     if (searchTerm.Length == 0)
     {
         CancelSearch();
         return;
     }
     if (!inSearchMode)
     {
         foreach (TreeNode node in classBrowserTreeView.Nodes)
         {
             oldNodes.Add(node);
         }
         inSearchMode = true;
         previousNodes.Clear();
         nextNodes.Clear();
         UpdateToolbars();
     }
     classBrowserTreeView.BeginUpdate();
     classBrowserTreeView.Nodes.Clear();
     if (ProjectService.OpenSolution != null)
     {
         foreach (IProject project in ProjectService.OpenSolution.Projects)
         {
             IProjectContent projectContent = ParserService.GetProjectContent(project);
             if (projectContent != null)
             {
                 foreach (IClass c in projectContent.Classes)
                 {
                     if (c.Name.ToUpper().StartsWith(searchTerm))
                     {
                         ClassNodeBuilders.AddClassNode(classBrowserTreeView, project, c);
                     }
                 }
             }
         }
     }
     if (classBrowserTreeView.Nodes.Count == 0)
     {
         ExtTreeNode notFoundMsg = new ExtTreeNode();
         notFoundMsg.Text = ResourceService.GetString("MainWindow.Windows.ClassBrowser.NoResultsFound");
         notFoundMsg.AddTo(classBrowserTreeView);
     }
     classBrowserTreeView.Sort();
     classBrowserTreeView.EndUpdate();
 }