开发者

Update UI while method is executing in main thread

开发者 https://www.devze.com 2023-03-20 04:53 出处:网络
I have a method that takes 30 seconds to run and updates a gridview after the 30 seconds is up. After 10 seconds, it receives the first item开发者_JS百科 in the grid. Also, after 20, the second item a

I have a method that takes 30 seconds to run and updates a gridview after the 30 seconds is up. After 10 seconds, it receives the first item开发者_JS百科 in the grid. Also, after 20, the second item and after the 30 seconds, the final item is received.

I want the grid to be updated every 10 seconds in the UI. Is this possible and how can it be done.

Thank you very much.


You could use a TImer control that would fire an event after whatever time you set to its Interval property. In that event handler, you could call your method or do whatever you want.

0

精彩评论

暂无评论...
验证码 换一张
取 消