示例#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);
		}
示例#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);
		}
示例#3
0
文件: Commands.cs 项目: xisuo67/dnSpy
 public override bool IsEnabled(CodeContext context) => !EditBodyCommand.IsVisibleInternal(editCodeVMCreator, context.MenuItemContextOrNull) && context.IsDefinition && EditMethodBodyCodeCommand.CanExecute(editCodeVMCreator, context.Nodes);