进度条的行动时间对任何方法或事件的影响 [英] Time of action for progressbar en fonction of any methode or event

查看:72
本文介绍了进度条的行动时间对任何方法或事件的影响的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,



是否有人可以向我解释如何让我的进度随着时间的推移而提前进行任何治疗,下载或阅读一些数据?



同一个ProgressBar可能适用于各种活动吗?



谢谢

Regards,

Is it possible that someone will explain to me how I could make my progressBar advance in function of time to take any treatment, download or read some data?

It is possible that the same ProgressBar works for various events?

thanks

推荐答案

如果您对操作需要多长时间有一个很好的估计,那么您可以使用计时器更新进度条(有很多例子 [ ^ ])。

更好的选择是在单独执行耗时的操作线程并从线程本身更新进度条(示例 [< a href =http://www.google。 co.uk/#fp=dbbba751b754a6cc&q=.NET+progressbar+threadtarget =_ blanktitle =New Window> ^ ])。

当然你可以重复使用相同的进度条显示不同操作的进度。
If you have a good estimate of how long the operation will take then you may update the progress bar using a timer (There are many examples[^]).
A better alternative is executing the time-consuming operations on separate threads and update the progress bar from the threads themselves (examples[^]).
Of course you can re-use the same progress bar for showing the progress of different operations.


这篇关于进度条的行动时间对任何方法或事件的影响的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆