From 48ceb99f67e838fea992231a1f745c790da622cb Mon Sep 17 00:00:00 2001 From: Erik Ejlskov Jensen Date: Tue, 24 Oct 2023 12:24:57 +0200 Subject: [PATCH] add Options context menu fixes #1973 --- .../EFCorePowerTools/EFCorePowerToolsPackage.cs | 17 ++++++++++++++++- .../EFCorePowerToolsPackage.en.vsct | 12 ++++++++++++ .../EFCorePowerToolsPackage.es.vsct | 12 ++++++++++++ .../EFCorePowerToolsPackage.it.vsct | 12 ++++++++++++ .../EFCorePowerToolsPackage.tr.vsct | 12 ++++++++++++ .../EFCorePowerToolsPackage.zh-Hans.vsct | 12 ++++++++++++ src/GUI/Shared/PkgCmdIDList.cs | 1 + 7 files changed, 77 insertions(+), 1 deletion(-) diff --git a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs index 7f79261af..e3ec6022a 100644 --- a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs +++ b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.cs @@ -233,6 +233,16 @@ protected override async System.Threading.Tasks.Task InitializeAsync(Cancellatio menuCommandId14); oleMenuCommandService.AddCommand(menuItem14); + var menuCommandId15 = new CommandID( + GuidList.GuidDbContextPackageCmdSet, + (int)PkgCmdIDList.cmdidOptions); + var menuItem15 = new OleMenuCommand( + OnProjectContextMenuInvokeHandler, + null, + OnProjectMenuBeforeQueryStatus, + menuCommandId15); + oleMenuCommandService.AddCommand(menuItem15); + var menuCommandId1101 = new CommandID( GuidList.GuidReverseEngineerMenu, (int)PkgCmdIDList.cmdidReverseEngineerEdit); @@ -329,7 +339,8 @@ private async void OnProjectMenuBeforeQueryStatus(object sender, EventArgs e) menuCommand.Visible = false; if (menuCommand.CommandID.ID == PkgCmdIDList.cmdidDbDgml - || menuCommand.CommandID.ID == PkgCmdIDList.cmdidAbout) + || menuCommand.CommandID.ID == PkgCmdIDList.cmdidAbout + || menuCommand.CommandID.ID == PkgCmdIDList.cmdidOptions) { menuCommand.Visible = true; return; @@ -525,6 +536,10 @@ private async void OnProjectContextMenuInvokeHandler(object sender, EventArgs e) { aboutHandler.ShowDialog(); } + else if (menuCommand.CommandID.ID == PkgCmdIDList.cmdidOptions) + { + ShowOptionPage(typeof(OptionsProvider.AdvancedOptions)); + } else if (menuCommand.CommandID.ID == PkgCmdIDList.cmdidDbCompare) { await compareHandler.HandleComparisonAsync(path, project); diff --git a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.en.vsct b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.en.vsct index 91f01db76..65b0d4be6 100644 --- a/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.en.vsct +++ b/src/GUI/EFCorePowerTools/EFCorePowerToolsPackage.en.vsct @@ -114,6 +114,17 @@ + + + + + + + + + +