【发布时间】:2015-07-01 08:17:12
【问题描述】:
在我尝试构建的包中,我正在通过以下方式注册“BeforeClosing”事件:
DTE dte = Package.GetGlobalService(typeof(DTE)) as DTE;
dte.Events.SolutionEvents.BeforeClosing += SolutionEvents_BeforeClosing;
事件处理程序如下所示:
private void SolutionEvents_BeforeClosing()
{
//Check some stuff
//Cancel the close operation
}
是否可以从事件处理程序中取消关闭解决方案(类似于e.Cancel = true;)?
【问题讨论】:
标签: c# visual-studio-2013 visual-studio-extensions