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();
		}
Exemple #2
0
 public UInt32FlagsHexField(HexDocument doc, string parentName, string name, ulong start)
     : base(doc, parentName, name, start, 4)
 {
     this.data = new UInt32VM(doc.ReadUInt32(start), a => UpdateValue(), false);
 }
Exemple #3
0
 public UInt32HexField(HexDocument doc, string parentName, string name, ulong start, bool useDecimal = false)
     : base(doc, parentName, name, start, 4)
 {
     this.data = new UInt32VM(doc.ReadUInt32(start), a => UpdateValue(), useDecimal);
 }
Exemple #4
0
 public UInt32HexField(HexDocument doc, string parentName, string name, ulong start, bool useDecimal = false)
     : base(doc, parentName, name, start, 4)
 {
     var val = doc.ReadUInt32(start);
     this.data = new UInt32VM(val, a => UpdateValue()) { UseDecimal = useDecimal };
     if (useDecimal)
         this.data.Value = val;
 }