很久很久以前就想实现多线程下载了,虽然迅雷和旋风还有很多工具都有,可是还是想自己实现,因为有些程序中要集成嘛。之前写到过一个调用迅雷下载引擎的,几个月后试了下不行了,就没有再管它了。
这个程序实现了多线程,断点续传,磁盘缓存等.
写这个程序呢,由于对多线程实在不是很熟...用了3天呢,收货嘛了解到一些多线程的控制.还有线程的暂停等..不用Thread.Abort。。
关于具体思路...由于写过一段时间已经忘了,就简单的看下代码吧..有一些注释,不懂得可以一起探究。
using System;
using System.Collection [...] 阅读全文
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 Windows7.DesktopIntegration;
namespace Windows7Test
{
public partial class Form1 : Form
{
[...] 阅读全文
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.Text.RegularExpressions;
using System.Threading;
using System.IO;
using MyHelper.TextHelper; [...] 阅读全文