基本信息
源码名称:BaiduPCS工具(模拟登陆百度网盘 并读取网盘文件)
源码大小:1.62M
文件格式:.rar
开发语言:C#
更新时间:2018-12-05
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):78630559
本次赞助数额为: 3 元×
微信扫码支付:3 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
百度网盘下载和上传工具。BaiduPCS 项目的 .net 4.0 封装。 图形界面,多线程上传和下载,断点续传,上传和下载目录。
{
InitializeComponent();
lvFileList.DoubleClick = lvFileList_DoubleClick;
lvFileList.KeyDown = lvFileList_KeyDown;
lvFileList.ColumnClick = LvFileList_ColumnClick;
txSearchKeyword.GotFocus = txSearchKeyword_GotFocus;
txSearchKeyword.LostFocus = txSearchKeyword_LostFocus;
txSearchKeyword.KeyPress = txSearchKeyword_KeyPress;
cmbLocation.KeyPress = cmbLocation_KeyPress;
history = new Stack<string>();
next = new Stack<string>();
sources = new List<PcsFileInfo>();
worker = new DUWorker();
worker.workfolder = GetWorkFolder();
worker.OnCompleted = worker_OnCompleted;
ReadAppSettings();
tempFileName = System.IO.Path.GetTempFileName();
}
private void Form1_Load(object sender, EventArgs e)
{
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
if (pcs == null)
{
bool succ = true;
ExecTask("Login", "Logging in ...",
new ThreadStart(delegate()
{
try
{
if (!createBaiduPCS())
{
succ = false;
this.Invoke(new AnonymousFunction(delegate()
{
Close();
//MessageBox.Show("Can't create BaiduPCS");
Application.Exit();
}));
return;
}
}
catch(Exception ex)
{
succ = false;
this.Invoke(new AnonymousFunction(delegate()
{
MessageBox.Show("Can't create BaiduPCS: " ex.Message);
Close();
Application.Exit();
}));
return;
}
}),
new ThreadStart(delegate()
{
if (!succ)
return;
this.Invoke(new AnonymousFunction(delegate()
{
Go("/");
worker.pcs = pcs;
worker.Start();
if (AppSettings.ResumeDownloadAndUploadOnStartup)
worker.Resume();
}));
}));
}
}
protected override void OnClosing(CancelEventArgs e)
{
if (frmHistory != null)
frmHistory.Close();
worker.Stop();
if (File.Exists(tempFileName))
{
try { File.Delete(tempFileName); }
catch { }
}
base.OnClosing(e);
}
百度网盘下载和上传工具。BaiduPCS 项目的 .net 4.0 封装。 图形界面,多线程上传和下载,断点续传,上传和下载目录。
public frmMain()
{
InitializeComponent();
lvFileList.DoubleClick = lvFileList_DoubleClick;
lvFileList.KeyDown = lvFileList_KeyDown;
lvFileList.ColumnClick = LvFileList_ColumnClick;
txSearchKeyword.GotFocus = txSearchKeyword_GotFocus;
txSearchKeyword.LostFocus = txSearchKeyword_LostFocus;
txSearchKeyword.KeyPress = txSearchKeyword_KeyPress;
cmbLocation.KeyPress = cmbLocation_KeyPress;
history = new Stack<string>();
next = new Stack<string>();
sources = new List<PcsFileInfo>();
worker = new DUWorker();
worker.workfolder = GetWorkFolder();
worker.OnCompleted = worker_OnCompleted;
ReadAppSettings();
tempFileName = System.IO.Path.GetTempFileName();
}
private void Form1_Load(object sender, EventArgs e)
{
}
protected override void OnShown(EventArgs e)
{
base.OnShown(e);
if (pcs == null)
{
bool succ = true;
ExecTask("Login", "Logging in ...",
new ThreadStart(delegate()
{
try
{
if (!createBaiduPCS())
{
succ = false;
this.Invoke(new AnonymousFunction(delegate()
{
Close();
//MessageBox.Show("Can't create BaiduPCS");
Application.Exit();
}));
return;
}
}
catch(Exception ex)
{
succ = false;
this.Invoke(new AnonymousFunction(delegate()
{
MessageBox.Show("Can't create BaiduPCS: " ex.Message);
Close();
Application.Exit();
}));
return;
}
}),
new ThreadStart(delegate()
{
if (!succ)
return;
this.Invoke(new AnonymousFunction(delegate()
{
Go("/");
worker.pcs = pcs;
worker.Start();
if (AppSettings.ResumeDownloadAndUploadOnStartup)
worker.Resume();
}));
}));
}
}
protected override void OnClosing(CancelEventArgs e)
{
if (frmHistory != null)
frmHistory.Close();
worker.Stop();
if (File.Exists(tempFileName))
{
try { File.Delete(tempFileName); }
catch { }
}
base.OnClosing(e);
}