本文介绍了我如何等待control_progressbar完成循环中的每个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
private void button2_Click(object sender, EventArgs e)
{
//I have a List(List_movieLinks) containing 900 strings.
for (int i = 0; i < List_movieLinks.Capacity; i++)
{
//I have a custom control(controlFile1) with a progressBar inside.
if (controlFile1.ready)
{
//until the progressBar value = 100 (until is full)
// 5 seconds are passing
// but the for loop is not stopping for those 5 seconds.
// how do I wait the progressBar to finish for every item in the loop?
}
}
}
//thank you
我尝试过:
What I have tried:
yes, it's a progress bar problem after all.
:)
problem solved
I was thinking at the timer element in the same time, but when I narrowed it down to bits, all became clear.
Thank you, all.
推荐答案
这篇关于我如何等待control_progressbar完成循环中的每个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!