示例#1
0
        private ExpertWatchCommand(ExpertWatchPackage package, OleMenuCommandService commandService)
        {
            this.package   = package ?? throw new ArgumentNullException(nameof(package));
            commandService = commandService ?? throw new ArgumentNullException(nameof(commandService));

            var menuCommandID = new CommandID(CommandSet, CommandId);

            menuCommand = new MenuCommand(this.ShowToolWindow, menuCommandID);
            commandService.AddCommand(menuCommand);
        }
示例#2
0
        public static void Initialize(ExpertWatchPackage package)
        {
            OleMenuCommandService commandService = package.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;

            Instance = new ExpertWatchCommand(package, commandService);
        }