Exemple #1
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 #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);
		}
		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();
		}