src/Misc/EFTools/DesignXmlCore/VisualStudio/Package/ExplorerWindow.cs
/// <summary>
///     Define a command handler.
///     When the user press the button corresponding to the CommandID
///     the EventHandler will be called.
/// </summary>
/// <returns>The menu command. This can be used to set parameter such as the default visibility once the package is loaded</returns>
Define a command handler.
When the user press the button corresponding to the CommandID
the EventHandler will be called.
Define a command handler . When the user press the button corresponding to the CommandID the EventHandler will be called .
internal OleMenuCommand DefineCommandHandler(EventHandler invokeHandler, Guid guidCmdSet, int cmdid)
        {
            var commandId = new CommandID(guidCmdSet, cmdid);
            if (null != _menuService)
            {
                var command = new OleMenuCommand(invokeHandler, commandId);
                if (null != command)
                {
                    _menuService.AddCommand(command);
                    return command;
                }
            }
            return null;
        }
internal OleMenuCommand DefineCommandHandler ( EventHandler invokeHandler , Guid guidCmdSet , int cmdid ) { var commandId = new CommandID ( guidCmdSet , cmdid ) ; if ( null != _menuService ) { var command = new OleMenuCommand ( invokeHandler , commandId ) ; if ( null != command ) { _menuService . AddCommand ( command ) ; return command ; } } return null ; }
Define a command handler.
Define a command handler .
// Add the command handler
The menu command. This can be used to set parameter such as the default visibility once the package is loaded
The menu command . This can be used to set parameter such as the default visibility once the package is loaded
invokeHandler
EventHandler
guidCmdSet
Guid
cmdid
int