本文介绍了事件中断另一个事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在做一个项目,我想要做的是,当用户单击按钮开始处理一些较长的程序时,而用户可以随时停止此程序,而我正在寻找的是触发另一个取消时触发事件,一旦触发取消事件将停止流程按钮事件,就有可能获取触发事件并将其停止.如果有任何建议,欢迎问候,请先谢谢.
I am working on a project what I want to do is when the use click a button to start processing some long procedure, while that the user able to stop this procedure at any time, what I am looking for is to fire another event on cancel, once the cancel event fired is to stop the process button event, is it possible to get the firing event and stop it. please if any one has a suggestion it is greeting and welcome, thank you in advance.
推荐答案您可以使用BackgroundWorker实现您正在说的内容. 请参见下面的链接, MSDN on Background worker with example [ ^ ] BackgroundWorker线程和支持取消 [ ^ ] 希望它对您有用, 谢谢. Hi, What you are talking can be fulfill using BackgroundWorker. Please see below links, MSDN on Background worker with example[^] BackgroundWorker Threads and Supporting Cancel[^] Hope it works for you, Thanks.
更多推荐
事件中断另一个事件
发布评论