private void BtnFind_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(TxtWhere.Text)) { return; } if (string.IsNullOrEmpty(TxtWhere.Text.Trim())) { TxtWhere.Clear(); return; } LuceneSearch search = new LuceneSearch(); if ("cmd:thongke" == TxtWhere.Text) { webBrowser1.DocumentText = search.GetAllDoc(); toolStripStatusLabel1.Text = " All file names"; } else { Lucene.Net.Search.Query query = search.GetTextQuery(TxtWhere.Text.Trim()); if (query != null) { lst = search.Search(query, MyConfig.GetMaxFindResult()); } toolStripStatusLabel1.Text = string.Format(" Found {0} files", lst.Count); webBrowser1.DocumentText = MyExt.ToShortHtml(lst); } search.LuceneDispose(); }
public TabView(OfficeData officeData) { InitializeComponent(); webBrowser1.DocumentText = MyExt.ToHtml(officeData); }