예제 #1
0
 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);
 }
예제 #2
0
 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);
 }
예제 #3
0
 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);
 }