我的图像下载程序有问题。当我运行它时,它会冻结,直到下载所有图像。标签改变,但图片框没有,我什至不能移动程序。
foreach (Match m in ms)
{
label3.Text = m.Value;
mastercount++;
pictureBox1.ImageLocation = m.Value;
try
{
WebClient wc = new WebClient();
wc.DownloadFile(m.Value, @downloadDest + "\\"+ mastercount + ".jpeg");
Thread.Sleep(1000);
}
catch (Exception x)
{
label3.Text = "Failed to download image" + m.Value;
}
}