// -------------------------- AddButton ------------------------------- public Microsoft.VisualStudio.CommandBars.CommandBarButton AddButton( DTE_Command InCmd, string InCaptionText) { Microsoft.VisualStudio.CommandBars.CommandBarButton but = null; but = (Microsoft.VisualStudio.CommandBars.CommandBarButton) InCmd.command.AddControl(mCmdBar, mCmdBar.Controls.Count + 1); but.Caption = InCaptionText; return(but); }
public CommandBarControl AddButtonControl( DTE_Command InCmd) { EnvDTE.Command cmd = InCmd.command; CommandBarControl added = (CommandBarControl)cmd.AddControl( mBar, Controls.Count + 1); added.Enabled = true; return(added); }
public DTE_Command AddCommand( string InName, ButtonText InButtonText, string InToolTipText, BuiltInBitmapIx InBitmapIx) { DTE_Command addedCmd = AddCommand( InName, InButtonText, InToolTipText, (int)InBitmapIx); return(addedCmd); }