是否有一个code ++模板/设计模式,我可以用反应鼠标点击或按键presses什么时候? [英] Is there a code template/design pattern I can use when reacting to mouse clicks or button presses?
问题描述
有一个问题,我经常用的WinForms应用程序看到的是,虽然长期运行的任务正在运行或只是简单的停止刷新GUI线程被卡住(是的,我知道 - 需要线程)。
One of the problems that I constantly see with Winforms applications is that the GUI thread is stuck while a long-running task is running or just plain stops refreshing (yes, I know - needs threading).
有没有code ++模板/设计模式,我可以用反应鼠标点击或按键presses什么时候?如果有一个处理线程一直在GUI应用程序运行?
Is there a code template/design pattern I can use when reacting to mouse clicks or button presses? Should there be a processing thread always running in the GUI app?
基本上,我怎么写一个伟大的WinForms应用程序,易于维护,没有任何奇特刷新错误?
Basically, how do I write a great Winforms Application that is easy to maintain and doesn't have any quirky refresh bugs?
推荐答案
这篇关于是否有一个code ++模板/设计模式,我可以用反应鼠标点击或按键presses什么时候?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!