Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在开发 Windows 窗体应用程序,为此我使用 SmartClient。在这里,当我想根据用户输入(确定/取消)显示消息框时单击工作区关闭('X')事件,我必须决定窗格是否必须关闭。
使用ParentForm.FormClosing事件,并Cancel适当地设置属性。
ParentForm.FormClosing
Cancel
在活动中订阅此Load活动。
Load
你不是在使用模型-视图-演示者模式吗?如果是,您可以覆盖表单演示者的 OnCloseView 方法。