Exemplo n.º 1
0
        public CommandBase(Package package, App.CommandManager cmdManager)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            if (cmdManager == null)
            {
                throw new ArgumentNullException("cmdManager");
            }

            this.package    = package;
            this.cmdManager = cmdManager;
        }
        private CommandDoxgenGeneratePreview(Package package, App.CommandManager cmdManager)
            : base(package, cmdManager)
        {
            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
                commandService.AddCommand(menuItem);
            }
        }
        private CommandDoxygenBrowseRef(Package package, App.CommandManager cmdManager, int commandId, string doxRef)
            : base(package, cmdManager)
        {
            this.CommandId = commandId;
            this.doxRef_   = doxRef;

            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
                commandService.AddCommand(menuItem);
            }
        }
        private CommandDoxygenBrowsePage(Package package, App.CommandManager cmdManager, int commandId, bool useSourcebrowser, bool useLocal, string htmlDest)
            : base(package, cmdManager)
        {
            this.CommandId        = commandId;
            this.UseSourcebrowser = useSourcebrowser;
            this.UseLocalDox      = useLocal;
            this.htmlDest_        = htmlDest;

            if (package == null)
            {
                throw new ArgumentNullException("package");
            }

            OleMenuCommandService commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            if (commandService != null)
            {
                var menuCommandID = new CommandID(CommandSet, CommandId);
                var menuItem      = new OleMenuCommand(this.MenuItemCallback, menuCommandID);
                menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
                commandService.AddCommand(menuItem);
            }
        }
 public static void Initialize(Package package, App.CommandManager cmdManager, int commandId, string doxRef)
 {
     Instance = new CommandDoxygenBrowseRef(package, cmdManager, commandId, doxRef);
 }
 public static void Initialize(Package package, App.CommandManager cmdManager, int commandId, bool useSourcebrowser, bool useLocal, string htmlDest)
 {
     Instance = new CommandDoxygenBrowsePage(package, cmdManager, commandId, useSourcebrowser, useLocal, htmlDest);
 }
 public static void Initialize(Package package, App.CommandManager cmdManager)
 {
     Instance = new CommandDoxgenGeneratePreview(package, cmdManager);
 }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package, App.CommandManager cmdManager)
 {
     Instance = new CommandDoxygenBrowseCurrentRef(package, cmdManager);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes the singleton instance of the command.
 /// </summary>
 /// <param name="package">Owner package, not null.</param>
 public static void Initialize(Package package, App.CommandManager cmdManager, int commandId, Type comment_type)
 {
     Instance = new CommandDocumentSource(package, cmdManager, commandId, comment_type);
 }