Пример #1
0
 int IVsSolutionEvents.OnQueryCloseProject(IVsHierarchy pHierarchy, int fRemoving, ref int pfCancel)
 {
     if (QueryCloseProject != null)
     {
         var project = pHierarchy.GetDteProject();
         QueryCloseProject(project, new QueryCloseProjectEventArgs(pHierarchy, fRemoving == 1));
     }
     return(VSConstants.S_OK);
 }
Пример #2
0
 int IVsSolutionEvents.OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved)
 {
     if (BeforeCloseProject != null)
     {
         var project = pHierarchy.GetDteProject();
         BeforeCloseProject(project, new BeforeCloseProjectEventArgs
         {
             Project = project,
             Hierarchy = pHierarchy,
             Removed = fRemoved == 1
         });
     }
     return VSConstants.S_OK;
 }
Пример #3
0
 int IVsSolutionEvents.OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
 {
     if (AfterOpenProject != null)
     {
         var project = pHierarchy.GetDteProject();
         AfterOpenProject(project, new AfterOpenProjectEventArgs
         {
             Hierarchy = pHierarchy,
             Project = project,
             Added = fAdded == 1
         });
     }
     return VSConstants.S_OK;
 }
Пример #4
0
 int IVsSolutionEvents.OnAfterLoadProject(IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy)
 {
     if (AfterLoadProject != null)
     {
         var project = pRealHierarchy.GetDteProject();
         AfterLoadProject(project, new AfterLoadProjectEventArgs
         {
             StubHierarchy = pStubHierarchy,
             RealHierarchy = pRealHierarchy,
             Project = project
         });
     }
     return VSConstants.S_OK;
 }
Пример #5
0
 int IVsSolutionEvents.OnBeforeCloseProject(IVsHierarchy pHierarchy, int fRemoved)
 {
     if (BeforeCloseProject != null)
     {
         var project = pHierarchy.GetDteProject();
         BeforeCloseProject(project, new BeforeCloseProjectEventArgs
         {
             Project   = project,
             Hierarchy = pHierarchy,
             Removed   = fRemoved == 1
         });
     }
     return(VSConstants.S_OK);
 }
Пример #6
0
 int IVsSolutionEvents.OnAfterOpenProject(IVsHierarchy pHierarchy, int fAdded)
 {
     if (AfterOpenProject != null)
     {
         var project = pHierarchy.GetDteProject();
         AfterOpenProject(project, new AfterOpenProjectEventArgs
         {
             Hierarchy = pHierarchy,
             Project   = project,
             Added     = fAdded == 1
         });
     }
     return(VSConstants.S_OK);
 }
Пример #7
0
 int IVsSolutionEvents.OnAfterLoadProject(IVsHierarchy pStubHierarchy, IVsHierarchy pRealHierarchy)
 {
     if (AfterLoadProject != null)
     {
         var project = pRealHierarchy.GetDteProject();
         AfterLoadProject(project, new AfterLoadProjectEventArgs
         {
             StubHierarchy = pStubHierarchy,
             RealHierarchy = pRealHierarchy,
             Project       = project
         });
     }
     return(VSConstants.S_OK);
 }
Пример #8
0
 int IVsSolutionEvents.OnBeforeUnloadProject(IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy)
 {
     if (BeforeUnloadProject != null)
     {
         var project = pRealHierarchy.GetDteProject();
         BeforeUnloadProject(project, new BeforeUnloadProjectEventArgs
         {
             Project       = project,
             RealHierarchy = pRealHierarchy,
             StubHierarchy = pStubHierarchy
         });
     }
     return(VSConstants.S_OK);
 }
Пример #9
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);
 }
Пример #10
0
 int IVsSolutionEvents.OnBeforeUnloadProject(IVsHierarchy pRealHierarchy, IVsHierarchy pStubHierarchy)
 {
     if (BeforeUnloadProject != null)
     {
         var project = pRealHierarchy.GetDteProject();
         BeforeUnloadProject(project, new BeforeUnloadProjectEventArgs
         {
             Project = project,
             RealHierarchy = pRealHierarchy,
             StubHierarchy = pStubHierarchy
         });
     }
     return VSConstants.S_OK;
 }
Пример #11
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;
 }
Пример #12
0
 int IVsSolutionEvents.OnQueryCloseProject(IVsHierarchy pHierarchy, int fRemoving, ref int pfCancel)
 {
     if (QueryCloseProject != null)
     {
         var project = pHierarchy.GetDteProject();
         QueryCloseProject(project, new QueryCloseProjectEventArgs(pHierarchy, fRemoving == 1));
     }
     return VSConstants.S_OK;
 }