腾牛·下载

显示更多 收起

搜书玩

大小:2.2M语言:中文 类别:下载工具系统:WinAll
版本:v1.0 吾爱破解版时间:2019-01-21
应用介绍

搜书玩是一款由吾爱破解论坛网友分享的一款小说下载工具,它是由.net写的,暂时是给网站运营下书用的,所以加了个壳,它在使用上也非常简单,只需输入你想下载的小说名,点击搜索即可一键搜索下载,有需要的朋友快来下载试试吧。

使用方法

在输入框内输入你要搜索的小说名称 或者 小说的作者

键盘按回车或者点击搜书按钮

然后在左侧的搜索结果中就能看到搜索的结果

点击左侧的结果即可在中间看到这本小说对应有多少的书源

点击下载即可在下方看到下载进度

点击目录即可看到小说下载完毕的位置

软件说明

搜书玩是一款小说下载软件,搜书玩支持各大平台,资源丰富,能够让你轻松找到你想要的小说,喜欢看小说的朋友一定不要错过

软件源码

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.IO;

using System.Linq;

using System.Net;

using System.Text;

using System.Threading;

using System.Threading.Tasks;

using System.Windows.Forms;

using CCWin;

using CCWin.SkinControl;

using libZhuishu;

namespace Novel

{

public partial class Form2 : CCSkinMain

{

public Form2()

{

InitializeComponent();

}

private void Form2_Load(object sender, EventArgs e)

{

skinDataGridView2.Columns.Add(new DataGridViewProgressBarColumn() { Name = "progrescolumn", HeaderText = "进度" });

SearchBox.Focus();

SearchBox.SelectAll();

}

private void SearchBtn_Click(object sender, EventArgs e)

{

SearchResultView.Items.Clear();

var booklist = LibZhuishu.fuzzySearch(SearchBox.Text.Trim(), 0, 10000);

ChatListItem ul = new ChatListItem() { Text = "搜索结果", IsOpen = true };

foreach (var book in booklist)

{

Image image = null;

try

{

string url = WebUtility.UrlDecode(book.cover);

int urlStartIndex = url.IndexOf("http:");

if (urlStartIndex >= 0)

{

url = url.Substring(urlStartIndex);

}

image = Image.FromStream(System.Net.WebRequest.Create(url).GetResponse().GetResponseStream());

}

catch  { }

ChatListSubItem li = new ChatListSubItem()

{

DisplayName = book.title,

NicName = book.author,

Tag = book._id,

PersonalMsg = book.shortIntro,

HeadImage = image

};

ul.SubItems.Add(li);

}

SearchResultView.Items.Add(ul);

}

private Button btn = new Button();

private void SearchResultView_ClickSubItem(object sender, CCWin.SkinControl.ChatListClickEventArgs e, MouseEventArgs es)

{

skinDataGridView1.Rows.Clear();

try

{

string bookid = e.SelectSubItem.Tag.ToString();

TocSummmaryInfo[] shuyuan = LibZhuishu.getTocSummary(bookid);

//  List<TocInfo> tocinfolist = new List<TocInfo>();

if (shuyuan.Length > 0)

{

foreach (var yuan in shuyuan)

{

if (yuan != null)

{

var row = skinDataGridView1.Rows.Add();

skinDataGridView1.Rows[row].Cells["id"].Value = bookid;

skinDataGridView1.Rows[row].Cells["book"].Value = e.SelectSubItem.DisplayName;

skinDataGridView1.Rows[row].Cells["tocid"].Value = yuan._id;

skinDataGridView1.Rows[row].Cells["tocname"].Value = yuan.name;

skinDataGridView1.Rows[row].Cells["lastchapter"].Value = yuan.lastChapter;

skinDataGridView1.Rows[row].Cells["chaptercount"].Value = yuan.chaptersCount.ToString();

skinDataGridView1.Rows[row].Cells["download"].Value = "下载";

// skinDataGridView1.Rows[row].Cells["progrescolumn"].Value = 0;

// ((DataGridViewProgressBarCell)skinDataGridView1.Rows[row].Cells["progrescolumn"]).Maximum = yuan.chaptersCount;

}

}

}

else

{

MessageBox.Show("尚未收录");

}

}catch(Exception ee)

{

throw ee;

}

}

private void skinDataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)

{

if(e.ColumnIndex==6)

{

var ss = skinDataGridView1.Rows[e.RowIndex].Cells["tocid"].Value.ToString();

var row = skinDataGridView2.Rows.Add();

skinDataGridView2.Rows[row].Cells["cid"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["id"].Value.ToString();

skinDataGridView2.Rows[row].Cells["cbook"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["book"].Value.ToString();

skinDataGridView2.Rows[row].Cells["ctocid"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["tocid"].Value.ToString();

skinDataGridView2.Rows[row].Cells["ctocname"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["tocname"].Value.ToString();

skinDataGridView2.Rows[row].Cells["clastchapter"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["lastchapter"].Value.ToString();

skinDataGridView2.Rows[row].Cells["cchaptercount"].Value = skinDataGridView1.Rows[e.RowIndex].Cells["chaptercount"].Value.ToString();

skinDataGridView2.Rows[row].Cells["cpath"].Value = Application.StartupPath + "\\" + skinDataGridView1.Rows[e.RowIndex].Cells["book"].Value.ToString()+ ".txt";

skinDataGridView2.Rows[row].Cells["progrescolumn"].Value = 0;

((DataGridViewProgressBarCell)skinDataGridView2.Rows[row].Cells["progrescolumn"]).Maximum = Convert.ToInt32(  skinDataGridView1.Rows[e.RowIndex].Cells["chaptercount"].Value.ToString());

TocChaperListInfo chapterlist = LibZhuishu.getChaperList(ss);

Pack pack = new Pack()

{

chapterlist = chapterlist,

bookname = skinDataGridView1.Rows[e.RowIndex].Cells["book"].Value.ToString(),

progress = ((DataGridViewProgressBarCell)skinDataGridView2.Rows[row].Cells["progrescolumn"])

};

// MessageBoxEx.Show(ss);

Thread thread = new Thread(new ParameterizedThreadStart(down));

thread.Start(pack);

}

}

private delegate void GoProgress(ProgressBar metroProgressBar1,int value);

public void GoBar(ProgressBar metroProgressBar1,int value)

{

if (metroProgressBar1.InvokeRequired)

{

GoProgress t = new GoProgress(GoBar);

metroProgressBar1.BeginInvoke(t, new object[] { value });

}

else

{

metroProgressBar1.Value = value;

}

}

public class Pack

{

public TocChaperListInfo chapterlist { set; get; }

public string bookname { set; get; }

public DataGridViewProgressBarCell progress { set; get; }

}

public void down(object pack)

{

try

{

tocChaperInfo[] chlist = ((Pack)pack).chapterlist.chapters;

string bookname = ((Pack)pack).bookname;

for (int i = 0; i < chlist.Length; i++)

{

try

{

var chap = LibZhuishu.getChapter(chlist[i].link);

string path = Path.Combine(Application.StartupPath, bookname + ".txt");

FileStream fs2 = new FileStream(path, FileMode.Append, FileAccess.Write);

StreamWriter sw = new StreamWriter(fs2, new System.Text.UTF8Encoding(false));

sw.WriteLine(chap.title);

sw.WriteLine(chap.body);

sw.Close();

fs2.Close();

fs2.Dispose();

}

catch (Exception eex)

{

throw eex;

}

finally

{

((Pack)pack).progress.Value = i;

}

}

((Pack)pack).progress.Value = ((Pack)pack).progress.Maximum;

}

catch { }

}

private void skinDataGridView2_CellContentClick(object sender, DataGridViewCellEventArgs e)

{

if (skinDataGridView2.Columns[e.ColumnIndex].Name== "cpath")

{

System.Diagnostics.ProcessStartInfo psi = new System.Diagnostics.ProcessStartInfo("Explorer.exe");

psi.Arguments = "/e,/select," + skinDataGridView2.Rows[e.RowIndex].Cells["cpath"].Value.ToString();

System.Diagnostics.Process.Start(psi);

}

}

private void SearchBox_KeyUp(object sender, KeyEventArgs e)

{

if(e.KeyCode==Keys.Enter)

{

SearchBtn_Click(null, null);

}

}

}

}

    厂商名称:
用户评论
取消
跟帖评论
    更多评论
    相关教程
    猜你喜欢
      本类排行
      其它版本