示例#1
0
 public static bool EditByteArrayHandler(ByteArrayFormData data)
 {
     HexEditor form = new HexEditor(data.NodeName, data.Data, data.BytesPerElement);
     if (form.ShowDialog() == DialogResult.OK && form.Modified) {
         Array.Copy(form.Data, data.Data, data.Data.Length);
         return true;
     }
     else
         return false;
 }
示例#2
0
        public static bool EditByteArrayHandler(ByteArrayFormData data)
        {
            var form = new HexEditor(data.NodeName, data.Data, data.BytesPerElement);

            if (form.ShowDialog() == DialogResult.OK && form.Modified)
            {
                data.Data = new byte[form.Data.Length];
                Array.Copy(form.Data, data.Data, data.Data.Length);
                return(true);
            }
            return(false);
        }
示例#3
0
 public override void SetRawData(byte[] data)
 {
     _textBox.Text = HexEditor.RawToText(data, BytesPerElem);
     RebuildElementIndex();
 }
示例#4
0
 public override byte[] GetRawData()
 {
     return(HexEditor.TextToRaw(_textBox.Text, BytesPerElem));
 }