Exemplo n.º 1
0
 /// <summary>
 /// 根据查找条件进行查找符合条件的书籍
 /// </summary>
 /// <param name="condition"></param>
 /// <returns></returns>
 public List<NodeBookMap> Search(SearchCondition condition)
 {
     SearchBookName(condition.KeyWord,condition.SearchRange,condition.Path);
     SearchBookAuthor(condition.KeyWord, condition.SearchRange);
     SearchBookDescription(condition.KeyWord, condition.SearchRange);
     if(condition.IsFilterFileType)
     {
         SearchFileType(condition.Exts);
     }
     return resultBook;
 }
Exemplo n.º 2
0
 public OutputBookList(string path, SearchCondition conditon, UpdateMainUICallback callback)
 {
     this.filePath = path;
     this.condition = conditon;
     this.updateUI = callback;
 }
Exemplo n.º 3
0
        private void btnStat_Click(object sender, EventArgs e)
        {
            if(CanStat())
            {
                SearchCondition cndt = new SearchCondition();
                cndt.Path = this.tvwMain.Nodes[0];
                cndt.AddSearchRange(new int[] { });
                IComparer<NodeBookMap> comparer = null;
                if (this.radFileType.Checked)
                {
                    comparer = new SortType();
                    cndt.IsFilterFileType = true;
                    cndt.FileType = this.txtStatFileType.Text;
                }

                cndt.SortComparer = comparer;
                ShowStatTip();
                Thread thrd = new Thread(BeginStat);
                thrd.Start(cndt);
            }
        }
Exemplo n.º 4
0
        private void btnSearch_Click(object sender, EventArgs e)
        {
            if(CanSearch())
               {
               SearchCondition cndt = new SearchCondition(this.txtSearchKeyWord.Text, this.chklSearchContent.CheckedIndices);
               cndt.Path = this.cmbxSearchPath.SelectedIndex == 0 ?
                  this.tvwMain.Nodes[0] : this.tvwMain.Nodes[0].Nodes[this.cmbxSearchPath.SelectedIndex - 1];

               cndt.IsFilterFileType = this.chkSearchFileType.Checked;
               cndt.FileType = this.txtSearchFileType.Text;

               ShowSearchTip();

               Thread thrd = new Thread(BeginSearch);
               thrd.Start(cndt);
               }
        }