Exemplo n.º 1
0
		CommandLoader(IWpfCommandService wpfCommandService, EditBodyCommand editBodyCmd) {
			var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT);
			ICommand editBodyCmd2 = editBodyCmd;
			cmds.Add(EditBodyCommand,
				(s, e) => editBodyCmd2.Execute(null),
				(s, e) => e.CanExecute = editBodyCmd2.CanExecute(null),
				ModifierKeys.Control | ModifierKeys.Shift, Key.E);
		}
Exemplo n.º 2
0
		CommandLoader(IWpfCommandService wpfCommandService, EditBodyCommand editBodyCmd) {
			var cmds = wpfCommandService.GetCommands(ControlConstants.GUID_DOCUMENTVIEWER_UICONTEXT);
			ICommand editBodyCmd2 = editBodyCmd;
			cmds.Add(EditBodyCommand,
				(s, e) => editBodyCmd2.Execute(null),
				(s, e) => e.CanExecute = editBodyCmd2.CanExecute(null),
				ModifierKeys.Control | ModifierKeys.Shift, Key.E);
		}
Exemplo n.º 3
0
 public override bool IsEnabled(CodeContext context) => !EditBodyCommand.IsVisibleInternal(editCodeVMCreator, context.MenuItemContextOrNull) && context.IsDefinition && EditMethodBodyCodeCommand.CanExecute(editCodeVMCreator, context.Nodes);