Exemplo n.º 1
0
		uint ReadFieldValue(HexDocument doc, ColumnInfo col) {
			ulong start = StartOffset + (ulong)col.Offset;
			if (col.Size == 2)
				return doc.ReadUInt16(start);
			else if (col.Size == 4)
				return doc.ReadUInt32(start);
			throw new InvalidOperationException();
		}
Exemplo n.º 2
0
 public UInt16FlagsHexField(HexDocument doc, string parentName, string name, ulong start)
     : base(doc, parentName, name, start, 2)
 {
     this.data = new UInt16VM(doc.ReadUInt16(start), a => UpdateValue(), false);
 }
Exemplo n.º 3
0
 public UInt16HexField(HexDocument doc, string parentName, string name, ulong start, bool useDecimal = false)
     : base(doc, parentName, name, start, 2)
 {
     this.data = new UInt16VM(doc.ReadUInt16(start), a => UpdateValue(), useDecimal);
 }
Exemplo n.º 4
0
 public UInt16HexField(HexDocument doc, string parentName, string name, ulong start, bool useDecimal = false)
     : base(doc, parentName, name, start, 2)
 {
     var val = doc.ReadUInt16(start);
     this.data = new UInt16VM(val, a => UpdateValue()) { UseDecimal = useDecimal };
     if (useDecimal)
         this.data.Value = val;
 }