使用WebClient类对网页下载源码,对文件下载保存及异步下载并报告下载进度
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAx4AAAI7CAIAAADtTtpYAAAgAElEQVR4nO3dX6xlV33Y8f3UJFUqHqJKtFJCK7WKW9I+dIJUgRS1UpMQp20ID3nIU6VCADsOCZA6gSS0+dMCprSQQj0GJ05DbYc5Y2yPjf+N67EHj+3QMtEAIe3QiRucYJsELpKrthkPpw9jX5+1z97r7L3W79yzz7mfj5ase/fde52199n3nO/cGc80pwAACNKcOnXqIgDApj32utdt0eg8BWkFAEzFxmtJWgEAu2PjtSStAIDdsfFaklYAwO7YeC1JKwBgd2y8lqQVALA7Nl5L0goA2LArxshPtfFaklYAwIZNLa3mLxq4fTNpdeHChXMjXbhwoeT5AQC2ytTSqrOiwruqNq3OnTt39uzZCwvOnj17+uQtv3vnNZfHE3dc8/jtP/nobVefnl196hNXPXTXh8+dO1fy/AAAW2VlMA3fM7B7FltqHV0VkFatn0JduHDhzL0f+P2bX/HkPd//v+6/8sl7X/s/7/5H/+OOf/DF2159+vpXPHjLVdIKDrXzN7y+6xes1z6w6YU9cO0VV7z+hvObXgbskGmm1WJRraOr1pNW93zgvx/723/+1K3f/Oo933z29m9+5eZLT91w6cnrHvutV93722+WVnCoTTGtHrj2hVVIK4g02bRa38+r1pVWj37qA5+/5Yr/90c3XfrKzZeeOnrpyesufeldl/7gqlNH/9aJ33yTtIJD7XJabf6HVJe9FFWvf720gmCTTaup/9Tq8ccfX/xT6k888cTpu/7tZ3/rb/zfL73v0pPvu/Sldz3/B1c//7kff/7sD933we+87aNvlFZwqE0vra594OKLy5JWEGmaabUFf9bqkRs+dPpn3/DQO9548u1vvPdtP/HA0V8/def7Hz36Xf/n82+99MWrn//cj188e+XFz7z64mPfc+K67/jE9W+QVnCoDUmr/Z8ldf1m4f4EL/zW4uUceuDaFz986eD94xbm64snaQXxJphW2/F/CD7yjjc89qqXf/ZHX/PYa7/3zr/7V+7+mTedvP26Bz748v/9mR99/uyVz3/mNRcf+zsXH/1rFx95+Sf/9bff+hFpBYfbirTq+aNYCwe8MMENL+6YpNUN1y4d1uq0nseWVhBvamm1HX+v1blz5x58+xt/93Wv+cbxW5/99X931z981Sd/+s33Hb/ujvd8x1dP/r1vPPTKb5x8xd59f3nvnpft3fOyY//q227+8D+XVnCodbbTi0nz4hcX66e9bX+CJJFeDKj9OFp4nP1tL+zU1VbSikOn8xcxnWoeImrPwB8pHcDoPIURaXXP237i1A++6tn/8IEn33rVrd/7ylt/6i2fOva+m975l/7TL7zsN37+2z/6L/7i0Xd82/Vv/9br3/4t//6ab5FWcNjl0qqvby4n0QtF9MIErT5KdrnYu+NLv2/YuSxpxSFyMGkV9Sgbr6UDTas7fubNd736e/7wp6/6/A9//43f/dd/+5qrHrz/9k994n13/c57T9z63jtvec8dN7807j3xcWkFh1ruNwT7wic5pnuCjkO7dpRWsJ02XksHmlbH3vqWG6/4rk9+39+/5ZXf/Z7v/Ks3/uTVdz/46I33/N7l8bFPnb3hrs9+7MR/PfnQw1/4whfOnj0rreBQk1bAeBuvpQNNq0/+m1/96D/5wY/849d+8Id/6P1XXvmff/XXjt3/xDtve/LX7nr6l+985l3Hn37bx//obb/5uXtOPvLMM89c/jcHoy84sD1WplXH15IgklZwCG28lg40rU6fPn3mzJkzZ848/PDDn/70p0+fPv079z3+c5/4w4/9l4sfunf+7tn8LTd8/Z+9/4m7739YWgH5/0Mw88fYW38+XVrBobLxWjrQtDp//vxzzz23t7d35syZp5566vz58x8/8eibrv/i++/683fP5lff+M0fe++z//TnHjpx7ylpBRT+5QsLzSOt4BDaeC0daFpd/odunnvuuTNnzlyOp9+YPfIj737sx37l937kF8/+wM/+t++75swPvPX+O+95SFoBQ/7K0FZetXpHWsEhtPFaOtC0Onv27IULF86fP3/69OnLf1D9trtP/cpHT/3L//jQL334wV/40Ml3fvCBX/7IyfseeMgfYwcACmy8lg4urS7/FGqU1j/nDACw84amFQAAK0krAIAw0goAIIy0AgAII60AAMJIKwC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JIKwCAMNIKACCMtAIACHpi2LsAAACeSURBVCOtAADCSCsAgDDSCgAgjLQCAAgjrQAAwkgrAIAw0goAIIy0AgAII60AAMJIKwCAMNIKACCMtAIACCOtAADCSCsAgDDSCgAgjLQCAAgjrQAAwkgrAIAw0goAIIy0AgAII60AAMJIKwCAMIVpBQBAp9FpBQDAKNIKACCMtAIACCOtAADCSCsAgDDSCgAgjLQCAAjzQloBABDi/wOzSJGys0Yn+QAAAABJRU5ErkJggg==" alt="" />
private void button1_Click(object sender, EventArgs e)
{
WebClient webclient = new WebClient();
webclient.Proxy = null;
webclient.Encoding = Encoding.UTF8;
richTextBox1.AppendText(webclient.DownloadString(textBox1.Text.Trim()));
webclient.Dispose();
} private void button2_Click(object sender, EventArgs e)
{
WebClient webclient = new WebClient();
webclient.Proxy = null;
webclient.DownloadFile(textBox2.Text, textBox3.Text);
MessageBox.Show("成功!");
webclient.Dispose(); } private void button3_Click(object sender, EventArgs e)
{
WebClient webclient = new WebClient();
webclient.Proxy = null;
webclient.DownloadProgressChanged += webclient_DownloadProgressChanged;
webclient.DownloadDataCompleted += webclient_DownloadDataCompleted;
webclient.DownloadFileAsync(new Uri(textBox2.Text), textBox3.Text);
webclient.Dispose();
} void webclient_DownloadDataCompleted(object sender, DownloadDataCompletedEventArgs e)
{
MessageBox.Show("成功");
} void webclient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progressBar1.Value = e.ProgressPercentage;
}
使用WebClient类对网页下载源码,对文件下载保存及异步下载并报告下载进度的更多相关文章
- Hadoop之HDFS原理及文件上传下载源码分析(下)
上篇Hadoop之HDFS原理及文件上传下载源码分析(上)楼主主要介绍了hdfs原理及FileSystem的初始化源码解析, Client如何与NameNode建立RPC通信.本篇将继续介绍hdfs文 ...
- maven 下载 源码和javadoc 命令
摘要:我们在写代码时候,往往是想查看一下源码,看看源码的一些细节内容.一般情况下,在IDE(如eclipse)中近仅仅只需按住ctrl+ 点击对应的方法即可进入对应的源码部分.但是有些时候很多依赖项并 ...
- Android———从GitHub上下载源码的方法【Written By KillerLegend】
首先声明,本文说的是从GitHub上下载源码而非上传源码! 1:下载tortoisegit,下载地址为: https://code.google.com/p/tortoisegit/wiki/Down ...
- 【Maven】Maven下载源码和Javadoc的方法
1:Maven命令下载源码和javadocs 当在IDE中使用Maven时如果想要看引用的jar包中类的源码和javadoc需要通过maven命令下载这些源码,然后再进行引入,通过mvn命令能够容易的 ...
- maven 下载 源码和javadoc命令
1:Maven命令下载源码和javadocs 当在IDE中使用Maven时如果想要看引用的jar包中类的源码和javadoc需要通过maven命令下载这些源码,然后再进行引入,通过mvn命令能够容易的 ...
- mvn 下载源码和javadoc
1. 下载源码,两种: . mvn dependency:sources . mvn eclipse:eclipse -DdownloadSources=true 2. 下载javadoc,两种: . ...
- maven编译下载源码
下载源码 mvn dependency:sources 跳过TEST mvn -DskipTests
- 查看android源码,windows环境下载源码
查看源码 参考: http://blog.csdn.net/janronehoo/article/details/8560304 步骤: 添加chrome插件 Android SDK Search 进 ...
- 上传本地代码到github&&从github下载源码
最近在玩github,下面简单介绍下githup的使用 将本地代码同步到github. 使用Git GUI同步 1,先下载git,然后安装.右键如图所示. 2,在github里新建一个 reposi ...
随机推荐
- php webservice 可能存在的坑
场景: 今天在生产机器上调用webservice失败 报 ...failed to load external entity... wget一下地址发现报500错误 把wsdl去掉再wget 发现就 ...
- Express 总结
Express Express提供了一个轻量级模块,把nodejs的http功能封装在一个简单易用的接口中.Express也扩展了http模块的功能,能轻松处理服务器的路由.响应.cookie和HTT ...
- Sql Server Profiler使用
在使用Entity Framework的过程当中,有时候需要看Entity Framework自动生成的Sql语句,在客户端可以使用跟踪的方法看到每次查询时的Sql语句,其实通过数据库 ...
- Spark性能优化--开发调优与资源调优
参考: https://tech.meituan.com/spark-tuning-basic.html https://zhuanlan.zhihu.com/p/22024169 一.开发调优 1. ...
- 解决Entity Framework查询匿名对象后的跨域访问的一种方式
在Entity Framework中,可以使用lambda表达式进行对数据的查询,而且可以将查询结果直接映射为对象或者对象列表,这极大的提高的开发速度,并且使数据层的数据更加方便处理和传递.但是很多时 ...
- JavaWeb(二)——Tomcat服务器(一)
一.Tomcat服务器端口的配置 Tomcat的所有配置都放在conf文件夹之中,里面的server.xml文件是配置的核心文件. 如果想修改Tomcat服务器的启动端口,则可以在server.xml ...
- 华硕N43sl VNP 连接问题 800 807 621
使用VPN 创建连接,在我自己的电脑上死活连接不上,换到别人的电脑就是可以妥妥的连接. 换了几多个IP都是800错误,经过测试都不能连接.于是开始排查,把防火墙关闭,把杀毒软件关闭, 在开始命令 输入 ...
- Java开发工程师(Web方向) - 03.数据库开发 - 第3章.SQL注入与防范
第3章--SQL注入与防范 SQL注入与防范 经常遇到的问题:数据安全问题,尤其是sql注入导致的数据库的安全漏洞 国内著名漏洞曝光平台:WooYun.org 数据库泄露的风险:用户信息.交易信息的泄 ...
- 进度条加载与案例优化对比——python使用perf_count方法实现
本章我们将讨论python3 perf_counter()的用法及它的实际应用我从中选取两个python基于rquests库的爬虫实例代码源文件进行举例 Python3 perf_counter() ...
- 227. Mock Hanoi Tower by Stacks【LintCode java】
Description In the classic problem of Towers of Hanoi, you have 3 towers and N disks of different si ...