public CommandTargetStatus Execute(Guid group, int cmdId, object args, ref object result) { if (IsReadOnly && IsEditCommand(group, cmdId)) { return(CommandTargetStatus.NotHandled); } if (group == HexCommandConstants.HexCommandGroup) { switch ((HexCommandIds)cmdId) { case HexCommandIds.GoToPosition: hexCommandOperations.GoToPosition(); return(CommandTargetStatus.Handled); case HexCommandIds.Select: hexCommandOperations.Select(); return(CommandTargetStatus.Handled); case HexCommandIds.SaveSelection: hexCommandOperations.SaveSelection(); return(CommandTargetStatus.Handled); case HexCommandIds.FillSelection: hexCommandOperations.FillSelection(); return(CommandTargetStatus.Handled); case HexCommandIds.EditLocalSettings: hexCommandOperations.EditLocalSettings(); return(CommandTargetStatus.Handled); case HexCommandIds.ResetLocalSettings: hexCommandOperations.ResetLocalSettings(); return(CommandTargetStatus.Handled); case HexCommandIds.ToggleUseRelativePositions: hexCommandOperations.ToggleUseRelativePositions(); return(CommandTargetStatus.Handled); default: return(CommandTargetStatus.NotHandled); } } return(CommandTargetStatus.NotHandled); }
public CommandTargetStatus Execute(Guid group, int cmdId, object args, ref object result) { if (IsReadOnly && IsEditCommand(group, cmdId)) { return(CommandTargetStatus.NotHandled); } if (group == HexCommandConstants.HexCommandGroup) { switch ((HexCommandIds)cmdId) { case HexCommandIds.GoToPositionAbsolute: hexCommandOperations.GoToPosition(PositionKind.Absolute); return(CommandTargetStatus.Handled); case HexCommandIds.GoToPositionFile: hexCommandOperations.GoToPosition(PositionKind.File); return(CommandTargetStatus.Handled); case HexCommandIds.GoToPositionRVA: hexCommandOperations.GoToPosition(PositionKind.RVA); return(CommandTargetStatus.Handled); case HexCommandIds.GoToPositionCurrent: hexCommandOperations.GoToPosition(PositionKind.CurrentPosition); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataBlob: hexCommandOperations.GoToMetadata(GoToMetadataKind.Blob); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataStrings: hexCommandOperations.GoToMetadata(GoToMetadataKind.Strings); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataUS: hexCommandOperations.GoToMetadata(GoToMetadataKind.US); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataGUID: hexCommandOperations.GoToMetadata(GoToMetadataKind.GUID); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataTable: hexCommandOperations.GoToMetadata(GoToMetadataKind.Table); return(CommandTargetStatus.Handled); case HexCommandIds.GoToMetadataMemberRva: hexCommandOperations.GoToMetadata(GoToMetadataKind.MemberRva); return(CommandTargetStatus.Handled); case HexCommandIds.Select: hexCommandOperations.Select(); return(CommandTargetStatus.Handled); case HexCommandIds.SaveSelection: hexCommandOperations.SaveSelection(); return(CommandTargetStatus.Handled); case HexCommandIds.FillSelection: hexCommandOperations.FillSelection(); return(CommandTargetStatus.Handled); case HexCommandIds.EditLocalSettings: hexCommandOperations.EditLocalSettings(); return(CommandTargetStatus.Handled); case HexCommandIds.ResetLocalSettings: hexCommandOperations.ResetLocalSettings(); return(CommandTargetStatus.Handled); case HexCommandIds.ToggleUseRelativePositions: hexCommandOperations.ToggleUseRelativePositions(); return(CommandTargetStatus.Handled); default: return(CommandTargetStatus.NotHandled); } } return(CommandTargetStatus.NotHandled); }