Example #1
0
        private void btn_search_Click(object sender, EventArgs e)
        {
            FormSearchResult form_result = new FormSearchResult();
            var results = LibZhuiShu.fuzzySearch(textbox_search.Text, 0, 100);

            if (results == null || results.Length < 1)
            {
                MessageBox.Show("没有找到:" + textbox_search.Text);
                return;
            }
            form_result.ShowResult(results);
        }
Example #2
0
 private void Method(object text)
 {
     try
     {
         var resultss = LibZhuiShu.fuzzySearch(text as string, 0, 100);
         if (resultss == null || resultss.Length < 1)
         {
             MessageBox.Show("没有找到:" + text as string);
             return;
         }
         form_result.ShowResult(resultss);
     }
     catch
     {
     }
 }
Example #3
0
        static void Main(string[] args)
        {
            var result = LibZhuiShu.autoComplate("完美");
            var books  = LibZhuiShu.fuzzySearch("完美世界", 0, 1);

            foreach (var book in books)
            {
                Console.WriteLine(string.Format("{0}  {1}  {2}", book._id, book.title, book.author));
                var tocs        = LibZhuiShu.getTocSummary(book._id);
                var chapertList = LibZhuiShu.getChaperList(tocs[0]._id);
                Console.WriteLine(LibZhuiShu.getChapter(chapertList.chapters[0].link).body);
            }
            foreach (var item in result)
            {
                Console.WriteLine("章节:" + item);
                Console.ReadKey();
            }
        }