axapta线程/动画
我有一个需要花费大量时间的功能。 该函数是通过 odbc 调用的 sql 查询 - 不是用 x++ 编写的,因为功能范围不够。
当此操作运行时,我想在表单上显示动画 - 在 aviFiles-macro 中定义。 尝试实现时,出现了几个问题:
- 动画不会在函数完成之前开始。
- 使用线程不会满足我的希望,因为 odbc 设置是在服务器上进行的,我猜该函数是在客户端调用的。
- 此外 - 我如何才能获得已完成任务的信息?
任何人都可以给我一个提示,如何
- 在表单上播放动画
- 做某事(在后台)并继续播放动画,直到要执行的任务完成
- 停止动画
编码,严格按照这个顺序进行编码,显示上述行为。
预先感谢您的提示和帮助!
i have a function which costs plenty of time.
this function is an sql-query called via odbc - not written in x++, since the functional range is insufficient.
while this operation is running, I want to show an animation on a form - defined in the aviFiles-macro.
trying to realize, several problems occur:
- the animation doesn't start prior the function has finished.
- using threads won't fulfill my hopes, since the odbc-settings are made on the server and i guess, the function is called on client-side.
- besides - how am i able to get the information that the treaded task has ended up?
could anyone give me a hint, how to
- play an animation on a form
- do something ( in background ) and go on playing the animation until the task to perform is finished
- stop the animation
coding this in exactly this order shows the behaviour mentioned above.
thanks in advance for hints and help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用标准AotFind作为示例:
另外
,你可以尝试不使用定时器,而是尽可能频繁地调用 infolog.yield() 。
You can use standard AotFind as an example:
tick
Also, you can try not to use timer, but to call infolog.yield() as often as possible.
如果您的 odbc 在 vs 项目中,这可能会以非常复杂的方式通过回调和委托来完成...
但这不是尝试找到更快/更有效的方式来查询数据的真正解决方案吗?
this could potentially be done in a very complicated way with call backs and delegates if your odbc is in a vs project...
but isn't the real solution to try to find a faster/more effective way to query your data?