예제 #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;
 }
예제 #2
0
 public OutputBookList(string path, SearchCondition conditon, UpdateMainUICallback callback)
 {
     this.filePath = path;
     this.condition = conditon;
     this.updateUI = callback;
 }
예제 #3
0
파일: frmMain.cs 프로젝트: lppco/read-more
        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);
            }
        }
예제 #4
0
파일: frmMain.cs 프로젝트: lppco/read-more
        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);
               }
        }