public bool Read(BinaryReader br) { long position = br.BaseStream.Position; bool isfooter = true; for (int i = 0; i < 8; i++) { if (!br.ReadByte().Equals(footer[i])) { isfooter = false; break; } } if (isfooter) { return(false); } br.BaseStream.Position = position; type = CBF.SwapShort(br.ReadInt16()); precision = br.ReadByte(); if (type != -99 && type != -98 && type != 0) { size = CBF.SwapShort(br.ReadInt16()); } name = String.Empty; byte b; while ((b = br.ReadByte()) != 0) { name += (char)b; } return(true); }
public void Read(BinaryReader br) { hid = (uint)br.ReadInt32(); s1 = CBF.SwapShort(br.ReadInt16()); s2 = CBF.SwapShort(br.ReadInt16()); br.BaseStream.Position = 4; b1 = br.ReadByte(); b2 = br.ReadByte(); b3 = br.ReadByte(); b4 = br.ReadByte(); }
public void Read(BinaryReader br) { type = br.ReadByte(); parts = (int)CBF.SwapWord(br.ReadUInt32()); switch (type) { case 1: break; case 2: ReadMultiLine(br); break; case 3: break; } }
private void ReadMultiLine(BinaryReader br) { geometry = new Polyline(); for (int i = 0; i < parts; i++) { gView.Framework.Geometry.Path path = new gView.Framework.Geometry.Path(); int vertices = (int)CBF.SwapWord(br.ReadUInt32()); double x = 0.0, y = 0.0; for (int v = 0; v < vertices; v++) { x += (double)br.ReadDecimal(); y += (double)br.ReadDecimal(); path.AddPoint(new Point(x, y)); } ((Polyline)geometry).AddPath(path); } }