コード例 #1
0
 private void MenuItemCallback(object sender, EventArgs e)
 {
     if (SolutionNavigator.getInstance().IsNavigated&& _dte.ActiveDocument != null && _dte.ActiveDocument.Selection != null)
     {
         if (!(SolutionNavigator.getInstance().Elements.Count > 0))
         {
             SolutionNavigator.Navigate(_dte.Solution.Projects);
         }
         HackThatDef();
     }
 }
コード例 #2
0
 int IVsSolutionEvents.OnAfterOpenSolution(object pUnkReserved, int fNewSolution)
 {
     SolutionNavigator.Navigate(_dte.Solution.Projects);
     AddCodeElementHandlers();
     return(VSConstants.S_OK);
 }