Ejemplo n.º 1
0
 private void AddResult(SearchFileInfo fileInfo)
 {
     ListViewItem item = new ListViewItem();
     item.Tag = fileInfo;
     item.Text = Path.GetFileName(fileInfo.Path);
     item.SubItems.Add(Path.GetDirectoryName(fileInfo.Path));
     item.SubItems.Add(fileInfo.LastWriteTime.ToString());
     item.SubItems.Add(fileInfo.SearchTexts);
     listViewResults.Items.Add(item);
 }
Ejemplo n.º 2
0
 private void AddResult(SearchFileInfo fileInfo)
 {
     pendingSearches.Add(fileInfo);
     if (!timer.Enabled)
     {
         timer.Enabled = true;
     }
 }
Ejemplo n.º 3
0
        private ListViewItem CreateListViewItem(SearchFileInfo searchFileInfo)
        {
            ListViewItem item = new ListViewItem();
            item.Tag = searchFileInfo;
            item.Text = Path.GetFileName(searchFileInfo.Path);
            item.SubItems.Add(Path.GetDirectoryName(searchFileInfo.Path));
            item.SubItems.Add(searchFileInfo.LastWriteTime.ToString());
            item.SubItems.Add(searchFileInfo.SearchTexts);
            if (showImage)
            {
                imageLoader.AddRequest(searchFileInfo.Path, item);
            }

            return item;
        }
Ejemplo n.º 4
0
 private void OnSearchFound(SearchFileInfo fileInfo)
 {
     if (SearchFound != null)
     {
         SearchFound(this, new SearchFoundEventArgs { FileInfo = fileInfo });
     }
 }
Ejemplo n.º 5
0
        private SearchFileInfo CreateSearchFileInfo(string file, string searchTextHits)
        {
            FileInfo fileInfo = new FileInfo(file);
            SearchFileInfo searchFileInfo = new SearchFileInfo();
            searchFileInfo.Path = file;
            searchFileInfo.LastWriteTime = fileInfo.LastWriteTime;
            searchFileInfo.SearchTexts = searchTextHits;

            return searchFileInfo;
        }