日期:2014-05-17 浏览次数:21058 次
public partial class L3
{
//新的的线程
private Thread thread;
public L3()
{
//线程初始化
thread = new Thread(new ThreadStart(ProcessSites));
}
//点击开始按钮
private void pictureBox_start_Click(object sender, EventArgs e)
{
if (是暂停状态)
恢复执行; //怎么写?
else
thread.Start();
}
//点击暂停按钮
private void pictureBox_pause_Click(object sender, EventArgs e)
{
//怎么写?
}
//点击停止按钮
private void pictureBox_stop_Click(object sender, EventArgs e)
{
thread.Abord();
}
//新线程调用的函数
private void ProcessSites()
{
code...;
code...;
}
}
}