/// <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; }
public OutputBookList(string path, SearchCondition conditon, UpdateMainUICallback callback) { this.filePath = path; this.condition = conditon; this.updateUI = callback; }
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); } }
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); } }