Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <Menus>
- <Menu guid="guidCmdSet" id="packageMenu" priority="0x0300" type="Menu">
- <Parent guid="guidSHLMainMenu" id="IDG_VS_CTXT_PROJECT_BUILD" />
- <CommandFlag>DynamicVisibility</CommandFlag>
- <CommandFlag>DefaultInvisible</CommandFlag>
- <Strings>
- <ButtonText>CPSProject</ButtonText>
- <CommandName>CPSProject</CommandName>
- </Strings>
- </Menu>
- <Groups>
- <Group guid="guidCmdSet" id="packageMenuGroup" priority="0x0600">
- <Parent guid="guidCmdSet" id="packageMenu" />
- </Group>
- </Groups>
- <Button guid="guidCmdSet" id="specialBuildActionId" priority="0x0100" type="Button">
- <Parent guid="guidCmdSet" id="packageMenuGroup" />
- <CommandFlag>DynamicVisibility</CommandFlag>
- <Strings>
- <ButtonText>Special build</ButtonText>
- </Strings>
- protected override async System.Threading.Tasks.Task InitializeAsync(System.Threading.CancellationToken cancellationToken, IProgress<ServiceProgressData> progress)
- {
- // Initialize the Fluent Migrator Menu, should only be visible for projects with FluentMigrator reference
- var mcs = await GetServiceAsync(typeof(IMenuCommandService)) as OleMenuCommandService;
- var menuCommandId = new CommandID(packageCmdSetGuidString, 0x1010);
- var menuItem = new OleMenuCommand(null, menuCommandId);
- menuItem.BeforeQueryStatus += MenuItem_BeforeQueryStatus;
- mcs.AddCommand(menuItem);
- }
- private void MenuItem_BeforeQueryStatus(object sender, EventArgs e) =>
- ((OleMenuCommand)sender).Visible = ???;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement