Esempio n. 1
0
 /// <summary>
 /// Called if the user hits the "Search" button on the full-text search pane
 /// </summary>
 /// <param name="sender">sender of the event</param>
 /// <param name="e">event parameters</param>
 private void helpSearch2_FTSearch(object sender, SearchEventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         DataTable dtResults = _reader.PerformSearch(e.Words, 500, e.PartialWords, e.TitlesOnly);
         helpSearch2.SetResults(dtResults);
     }
     finally
     {
         this.Cursor = Cursors.Arrow;
     }
 }
Esempio n. 2
0
 private void OnFullTextSearch(object sender, Sandcastle.Viewers.HtmlHelp.Controls.SearchEventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         DataTable dtResults = _reader.PerformSearch(e.Words, 500,
                                                     e.PartialWords, e.TitlesOnly);
         helpSearch.SetResults(dtResults);
     }
     finally
     {
         this.Cursor = Cursors.Arrow;
     }
 }
Esempio n. 3
0
        private void SearchFullText(string keyword)
        {
            string sort = "Rating ASC";

            WriteIfVerbose(String.Format("Searching fulltext database for {0}",
                                         keyword));

            bool      partialMatches = false;
            bool      titlesOnly     = true;
            int       maxResults     = 100;
            DataTable results        = chm.PerformSearch(keyword,
                                                         maxResults,
                                                         partialMatches,
                                                         titlesOnly);

            WriteIfVerbose(String.Format("results.Rows.Count = {0}",
                                         results != null ?
                                         results.Rows.Count.ToString() : "(none)"));
            if (results != null && results.Rows.Count > 0)
            {
                results.DefaultView.Sort = sort;
                if (!DisplayResult(keyword,
                                   results))
                {
                    Say("No result");
                }
            }
            else
            {
                Say("No result");
            }
        }
 public DataTable Search(string keyword)
 {
     return(_reader.PerformSearch(keyword, 500, true, true));
 }