看到长期工作的进展 [英] Seeing progress of a long job
问题描述
大家好!
当运行一个漫长的过程时,我的屏幕经常出现空白,我不知道这个工作的程序有多远。
尽管我显示的是参考编号,但这是事实。并刷新。 它工作了一段时间 - 非常漂亮! - 但随后屏幕冻结。
如果我让它继续运行,最终我会回到我的菜单(主页),所以我知道工作已经完成。
提前致谢,
Tony Piwood
Tony,
即使我不知道具体细节,这听起来像是背景工作者的主要候选人。
问题是 - 如果我是当然,正确理解 - 您的GUI与进程位于同一个线程上,从而使GUI无响应。在这种情况下,BGW是完美的。
调查一下,如果你仍然不确定它,可以解释一下,或许明天(这是深夜)我或者有人会建造一个更详细解释的例子。
祝你好运。 :)
Hi everyone!
When running a long process, my screen often blanks out and I have no idea how far through the procedure the job is.
This is in spite of the fact that I display the reference no. and refresh. It works for a time - beautifully! - but then the screen freezes.
If I leave it to run, eventually I get back to my menu (main) page, so I know the job has completed.
Thanks in advance,
Tony Piwood
Tony,
Even though I don't know the specifics, this sounds like a prime candidate for a background worker.
The issue is - if I'm understanding correctly, of course - that your GUI is on the same thread as the process, thus making the GUI unresponsive. A BGW is perfect in this case.
Look into that and if you're still unsure about it, explain a bit more then maybe tomorrow (it's late night here) I or someone will build an example to explain in more detail.
Good luck with it. :)
这篇关于看到长期工作的进展的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!