开发者

Status Message during function call (WPF, Multithreadin)

开发者 https://www.devze.com 2023-02-28 22:47 出处:网络
I hav开发者_运维问答e one \"CleanUp\" button on my WPF UI.By clicking on this button, I\"ll call some C++ wrapper function to do some calculation.The calculation will take some time.

I hav开发者_运维问答e one "CleanUp" button on my WPF UI.By clicking on this button, I"ll call some C++ wrapper function to do some calculation.The calculation will take some time. What I want exactly: 1. During calculation, I want to show some message like "Clean-Up is going on" besides one node of TreeView (TreeView is present on same UI.

Any help would be appreciated........


You can try by using a BackgroundWorker.

Just set a new background worker and set it's dowork event to your "wrapper function to do some calculation" ;-)

After that you can trigger the reportprogress event to set a new state or message while it's executing.

0

精彩评论

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

关注公众号