Esempio n. 1
0
 // --------------------------------------------------------------------------------------------
 /// <summary>
 /// Notifies listening clients that the project is about to be closed.
 /// </summary>
 // --------------------------------------------------------------------------------------------
 public int OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved)
 {
     if (QueryCloseProject != null)
     {
         var e = new CloseProjectEventArgs(SolutionEventType.BeforeCloseProject)
         {
             Hierarchy = pHierarchy,
             Cancel    = false
         };
         QueryCloseProject(this, e);
     }
     return(VSConstants.S_OK);
 }
Esempio n. 2
0
 // --------------------------------------------------------------------------------------------
 /// <summary>
 /// Queries listening clients as to whether the project can be closed.
 /// </summary>
 // --------------------------------------------------------------------------------------------
 public int OnQueryCloseProject(IVsHierarchy pHierarchy, int fRemoving, ref int pfCancel)
 {
     if (QueryCloseProject != null)
     {
         var e = new CloseProjectEventArgs(SolutionEventType.QueryCloseProject)
         {
             Hierarchy = pHierarchy,
             Cancel    = pfCancel != 0
         };
         QueryCloseProject(this, e);
         pfCancel = e.Cancel ? 1 : 0;
     }
     return(VSConstants.S_OK);
 }