2012-03-25 22 views

回答

1

您可以使用ExecCommand

public void Exec(string commandName, vsCommandExecOption executeOption, ref object varIn, ref object varOut, ref bool handled) 
    { 
     handled = false; 
     if(executeOption == vsCommandExecOption.vsCommandExecOptionDoDefault) 
     { 
      if(commandName == "MyAddin1.Connect.MyAddin1") 
      { 
       //_applicationObject.ActiveWindow.WindowState. 
       _applicationObject.ExecuteCommand("Window.NewWindow"); 
       _applicationObject.ExecuteCommand("Window.NewVerticalTabGroup"); 
       handled = true; 
       return; 
      } 
     } 
    } 
+0

謝謝你,這個出色的作品! – 2012-03-30 15:26:08

相關問題