当我要求在一个长时间运行的进程上放置一个进度条时,我想到了这个问题,该进程没有用户界面的概念。事实上,该进程正在被写入一个库,以便从其他应用程序中提取。但是,如何为 WinForm 提供一种方式来订阅流程以在流程执行时进行更新?我已经从 VBA/VB6 和 .Net 中打开了这个问题,因为它是 UI 开发范围的一部分。还值得一提的是,这些是子例程,而不是运行方法的类,因此事件引发似乎是不可能的。我应该将递增变量公开吗?提前致谢。
Adam: Should we be eating of forbidden fruit?
Eve: Yes. I think so. Go ahead Adam.
Serpant: Stop with the chit-chat and expose those variables already....
God: Noooooooooooo!!!