Ejemplo n.º 1
0
        static AddressReference GetAddressReference(ContextMenuEntryContext context)
        {
            var info = TVChangeBodyHexEditorCommand.GetMethodLengthAndOffset(context);

            if (info != null)
            {
                return(new AddressReference(info.Value.Filename, false, info.Value.Offset, info.Value.Size));
            }

            return(null);
        }
Ejemplo n.º 2
0
        static byte[] GetMethodBodyBytes(ContextMenuEntryContext context)
        {
            var info = TVChangeBodyHexEditorCommand.GetMethodLengthAndOffset(context);

            if (info == null || info.Value.Size > int.MaxValue)
            {
                return(null);
            }
            var doc = HexDocumentManager.Instance.GetOrCreate(info.Value.Filename);

            if (doc == null)
            {
                return(null);
            }
            return(doc.ReadBytes(info.Value.Offset, (int)info.Value.Size));
        }
Ejemplo n.º 3
0
 public override bool IsVisible(ContextMenuEntryContext context)
 {
     return(TVChangeBodyHexEditorCommand.GetMethodLengthAndOffset(context) != null);
 }