private BuildCommand(BuildCommandPackage package) { this.package = package ?? throw new ArgumentNullException(nameof(package)); var commandService = this.ServiceProvider.GetService(typeof(IMenuCommandService)) as OleMenuCommandService; if (commandService != null) { commandService.AddCommand(new OleMenuCommand(OnMenuClick1, OnMenuStateChanged, OnMenuQueryStatus, new CommandID(CommandSet, FBS_ITEM_CHECK_FBS))); commandService.AddCommand(new OleMenuCommand(OnMenuClick2, OnMenuStateChanged, OnMenuQueryStatus, new CommandID(CommandSet, FBS_ITEM_CHECK_FBS_ALL))); commandService.AddCommand(new OleMenuCommand(OnMenuClick3, OnMenuStateChanged, OnMenuQueryStatus, new CommandID(CommandSet, FBS_ITEM_CHECK_DATA))); commandService.AddCommand(new OleMenuCommand(OnMenuClick4, OnMenuStateChanged, OnMenuQueryStatus, new CommandID(CommandSet, FBS_ITEM_CHECK_DATA_ALL))); } }
public static void Initialize(BuildCommandPackage package) { Instance = new BuildCommand(package); }