调用处:
[C#] 纯文本查看 复制代码 new Thread(new ThreadStart(this.UploadingListen)).Start();
方法处:
[C#] 纯文本查看 复制代码 private void UploadingListen()
{
while (true)
{
Thread.Sleep(250);
if (listDel == null || listDel.Count == 0) return;
for (int i = 0; i < listDel.Count; i++)
{
if (!listDel[i].File.Complete)
{
((DataGridViewRow)listDel[i].File.Model).Cells[4].Value = listDel[i].File.Uploaded;
}
else
{
Console.WriteLine("删掉了{0}", i);
this.dataGridViewUploading.Rows.RemoveAt(i);
listDel.Remove(listDel[i]);
i--;
}
}
}
}
|