示例#1
0
 int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel)
 {
     if (QueryUnloadProject != null)
     {
         var project   = pRealHierarchy.GetDteProject();
         var eventArgs = new QueryUnloadProjectEventArgs
         {
             Project = project,
             Cancel  = pfCancel == 1
         };
         QueryUnloadProject(project, eventArgs);
         pfCancel = eventArgs.Cancel ? 1 : 0;
     }
     return(VSConstants.S_OK);
 }
示例#2
0
 int IVsSolutionEvents.OnQueryUnloadProject(IVsHierarchy pRealHierarchy, ref int pfCancel)
 {
     if (QueryUnloadProject != null)
     {
         var project = pRealHierarchy.GetDteProject();
         var eventArgs = new QueryUnloadProjectEventArgs
         {
             Project = project,
             Cancel = pfCancel == 1
         };
         QueryUnloadProject(project, eventArgs);
         pfCancel = eventArgs.Cancel ? 1 : 0;
     }
     return VSConstants.S_OK;
 }