摘要:
很多人认为关闭应用程序应该很简单,例如WindowsForm里一个Application.Exit();方法就可以解决问题,但在WPF里面可别滥用,因为WPF里Application类没有该方法,倒是有一个Exit的事件驱动,在WPF应用程序里面关闭程序讲究很多:
在WPF应用程序的关闭是有ShutdownMode属性设置,具有3中枚举类型的值:
1)OnLastWindowClose 应用程序最后一个窗体关闭时关闭应用程序
2)OnMainWindowClose 应用程序主窗体关闭时关闭应用程序
3)OnExplicitShutdown 显示调用关闭
阅读全文
摘要:
代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--1publicpartialclassShareService:IUserServers2{3publicintInsertUserInfo(Model.UserServersModel.UserSe... 阅读全文