关闭(并选择保存)所有屏幕 [英] Close (and Optionally Save) All Screens
问题描述
使用易于扩展的扩展程序,我添加了全局关闭所有屏幕"命令,如下所示:
添加
自定义命令,全局命令和新命令组添加到LightSwitch按钮功能区
但是,当我使用从"currentScreen"中更改参数时.关闭(假)"到"currentScreen.Close(True)",它应该每个
屏幕提示用户保存,如果我有多个需要保存的屏幕,应用程序将崩溃,从而使我只有无响应的纯白色屏幕.
我怀疑是由于close命令在由于存在单独的线程,因此正在发生某种竞争状况,但是
我不知道如何解决.
有人有任何想法吗?
谢谢!
-Jon
我可以建议您检测出待处理的更改并自己提示用户,然后使用'.Close(false)'.>
如果无法使用线程/调度程序来解决技术问题,那就去吧.
欢呼
Using Extensions Made Easy, I've added the global "Close All Screens" command, as per here:
Adding
custom commands, global commands and new command groups to the LightSwitch button ribbon
But when I use the change the parameter from "currentScreen.Close(False)" to "currentScreen.Close(True)", which should have each
screen prompt the user to save, if I have multiple screens which need saving, the app crashes, leaving me with just an unresponsive pure white screen.
I suspect that this is happening because the close command runs in a seperate thread and some kind of race condition is occuring because of it, but
I do not know how to fix it.
Anybody got any ideas?
Thanks in advance!
--Jon
May I suggest you detect the pending changes and prompt the user yourself, then use '.Close(false)'.
If you cannot sort out a technical way with threads/dispatchers then go for that.
Cheers
这篇关于关闭(并选择保存)所有屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!