private void SearchFolder(ArrayList searchposition, CFolderCollection folders, CFileCollection files, string[] keywords)
        {
            if (ThreadAbort)
            {
                return;
            }
            int i = -1;

            for (int j = 0; j < folders.Count; j++)
            {
                if (ThreadAbort)
                {
                    return;
                }
                i++;
                searchposition.Add(i);
                OnSearchResultItemAdd(null, new SearchResultItemEventArgs(new SearchResultItem(MatchKeyword(keywords, folders[j].Name.ToLower()), searchposition, true)));
                SearchFolder(searchposition, folders[j].Folders, folders[j].Files, keywords);
                searchposition.RemoveAt(searchposition.Count - 1);
            }

            i = -1;
            for (int k = 0; k < files.Count; k++)
            {
                if (ThreadAbort)
                {
                    return;
                }
                i++;
                searchposition.Add(i);
                OnSearchResultItemAdd(null, new SearchResultItemEventArgs(new SearchResultItem(MatchKeyword(keywords, files[k].Name.ToLower()), searchposition, false)));
                searchposition.RemoveAt(searchposition.Count - 1);
            }
        }
Beispiel #2
0
        private static void ResetContent(CFolderCollection c1, CFileCollection c2)
        {
            for (int i = 0; i < c2.Count; i++)
            {
                c2[i].IconIndex = -1;
                c2[i].Type      = "";
            }

            foreach (CFolder cf in c1)
            {
                //if (cf.IconIndex != CommVar.CloseFolderIconIndex)
                cf.IconIndex = -1;
                ResetContent(cf.Folders, cf.Files);
            }
        }