惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
C
Cisco Blogs
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
IT之家
IT之家
博客园 - 【当耐特】
V
V2EX
博客园_首页
T
Tailwind CSS Blog
Last Week in AI
Last Week in AI
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
C
CXSECURITY Database RSS Feed - CXSecurity.com
博客园 - 司徒正美
N
Netflix TechBlog - Medium
F
Fortinet All Blogs
Know Your Adversary
Know Your Adversary
S
Schneier on Security
V
Vulnerabilities – Threatpost
T
The Exploit Database - CXSecurity.com
Vercel News
Vercel News
量子位
G
GRAHAM CLULEY
T
Threatpost
D
Darknet – Hacking Tools, Hacker News & Cyber Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cybersecurity and Infrastructure Security Agency CISA
S
Security @ Cisco Blogs
B
Blog
Stack Overflow Blog
Stack Overflow Blog
T
Tor Project blog
A
About on SuperTechFans
博客园 - 叶小钗
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
S
Securelist
博客园 - 聂微东
Cloudbric
Cloudbric
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
H
Help Net Security
N
News | PayPal Newsroom
P
Privacy & Cybersecurity Law Blog
Schneier on Security
Schneier on Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
W
WeLiveSecurity
Martin Fowler
Martin Fowler
K
Kaspersky official blog
S
Security Affairs
TaoSecurity Blog
TaoSecurity Blog

博客园 - yulei

几个css技巧 HttpWebRequest 发送 POST实现自动用户登录 - yulei jquery selector 基础 - yulei asp.net ajax实现:Jquery+Json - yulei - 博客园 smtp协议 发送带附件的邮件 控制滚动条 (转)防数据库批量注入JS 转载 JS获取CSS属性值 - yulei - 博客园 HttpCompress相关问题解决方法 - yulei - 博客园 C#发送Email邮件方法总结 数据导出到excel文件给客户端下载的几种方法(转) ndoc2007,生成注释文档,支持泛型,2.0,中文注解,部分汉化 IE和Firefox浏览器CSS网页布局不同点 - yulei - 博客园 通用获得网页的实际大小的javascript函数 仿DVBBS下拉菜单效果 asp.net下URL网址重写成.html格式、RSS、OPML的知识总结 导出excel 使用AD724的RGB→NTSC/PAL制信号转换电路 AV-RF转换器的制作
webClient下载进度条
yulei · 2009-03-08 · via 博客园 - yulei
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;namespace DownlaodFile
{
public partial class Form1 : Form
{
System.Net.WebClient c ;
public Form1()
{
InitializeComponent();
c
= new System.Net.WebClient();
c.DownloadProgressChanged
+= new System.Net.DownloadProgressChangedEventHandler(c_DownloadProgressChanged);
c.DownloadFileCompleted
+= new AsyncCompletedEventHandler(c_DownloadFileCompleted);
c.Proxy
=WebRequest.DefaultWebProxy;
c.Proxy.Credentials
= new NetworkCredential("admin", "admin_password", "domain");
}
void c_DownloadFileCompleted(object sender, AsyncCompletedEventArgs e)
{
MessageBox.Show(
"ok");
}
private void btnDownload_Click(object sender, EventArgs e)
{
c.DownloadFileAsync(
new Uri(txtUrl.Text), @"d:"t.dat");
}
void c_DownloadProgressChanged(object sender, System.Net.DownloadProgressChangedEventArgs e)
{
progressBar1.Value
= e.ProgressPercentage;
}
private void btnQuit_Click(object sender, EventArgs e)
{
if (c!=null)
{
c.CancelAsync();
}
Close();
}
}
}