示例#1
0
        private PmipItCommand(PmipItPackage package)
        {
            if (package == null)
                throw new ArgumentNullException();

            _package = package;

            var commandService = ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService;
            if (commandService == null)
                return;

            var menuCommandId = new CommandID(CommandSet, CommandId);
            var menuItem = new MenuCommand(MenuItemCallback, menuCommandId);
            commandService.AddCommand(menuItem);
        }
示例#2
0
 public static void Initialize(PmipItPackage package)
 {
     Instance = new PmipItCommand(package);
 }