public ViewContextMenu(MenuCommandParameters menuCommandParameters, ExplorerToolWindow parent) { var tcmd = new ViewMenuCommandsHandler(parent); //TODO Why does the Report Viewer fail? //ReportDataMenuItem(tcmd, menuCommandParameters); //Items.Add(new Separator()); CreateScriptAsCreateMenuItem(tcmd, menuCommandParameters); CreateScriptAsDropMenuItem(tcmd, menuCommandParameters); }
private void CreateScriptAsDropMenuItem(ViewMenuCommandsHandler tcmd, MenuCommandParameters menuCommandParameters) { var scriptCommandBinding = new CommandBinding(IndexMenuCommands.IndexCommand, tcmd.ScriptAsDrop); var scriptMenuItem = new MenuItem { Header = "Script as DROP", Icon = ImageHelper.GetImageFromResource("../resources/script_16xLG.png"), Command = IndexMenuCommands.IndexCommand, CommandParameter = menuCommandParameters }; scriptMenuItem.CommandBindings.Add(scriptCommandBinding); Items.Add(scriptMenuItem); }
private void ReportDataMenuItem(ViewMenuCommandsHandler tcmd, MenuCommandParameters menuCommandParameters) { var scriptCommandBinding = new CommandBinding(TableMenuCommands.TableCommand, tcmd.ReportTableData); var scriptMenuItem = new MenuItem { Header = "View Data as Report", Icon = ImageHelper.GetImageFromResource("../resources/Tables_8928.png"), Command = TableMenuCommands.TableCommand, CommandParameter = menuCommandParameters }; scriptMenuItem.CommandBindings.Add(scriptCommandBinding); Items.Add(scriptMenuItem); }