static void Main(string[] args) { //var books = LibZhuiShu.fuzzySearch("完美世界", 0, 1); Console.WriteLine("xx:" + LibZhuiShu.autoComplate("完美")); //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); //} Console.ReadKey(); }
static void Main(string[] args) { new Thread(new ParameterizedThreadStart((o) => { new testlib.Class1(); })).Start(); 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(); } }
private void textbox_search_TextChanged(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(textbox_search.Text)) { return; } listbox_autocomplate.Items.Clear(); RunAsync(() => { var words = LibZhuiShu.autoComplate(textbox_search.Text); RunInMainthread(() => { if (words != null && words.Length > 0) { listbox_autocomplate.Items.AddRange(words); listbox_autocomplate.Visible = true; } else { listbox_autocomplate.Visible = false; } }); }); }