CommandLoader(IWpfCommandManager wpfCommandManager, EditILInstructionsCommand editILCmd) {
			var cmds = wpfCommandManager.GetCommands(CommandConstants.GUID_TEXTEDITOR_UICONTEXT);
			ICommand editILCmd2 = editILCmd;
			cmds.Add(EditILInstructionsCommand,
				(s, e) => editILCmd2.Execute(null),
				(s, e) => e.CanExecute = editILCmd2.CanExecute(null),
				ModifierKeys.Control, Key.E);
		}
Exemple #2
0
        CommandLoader(IWpfCommandManager wpfCommandManager, EditILInstructionsCommand editILCmd)
        {
            var      cmds       = wpfCommandManager.GetCommands(CommandConstants.GUID_DOCUMENTVIEWER_UICONTEXT);
            ICommand editILCmd2 = editILCmd;

            cmds.Add(EditILInstructionsCommand,
                     (s, e) => editILCmd2.Execute(null),
                     (s, e) => e.CanExecute = editILCmd2.CanExecute(null),
                     ModifierKeys.Control | ModifierKeys.Shift, Key.E);
        }
 public override bool IsEnabled(CodeContext context) => !EditILInstructionsCommand.IsVisibleInternal(context.MenuItemContext) && context.IsDefinition && EditMethodBodyILCommand.CanExecute(context.Nodes);