public void Add(BaseNCZObject value) { if (value.NCZObjectType == typeof(NCZFileHeader)) { HasFileHeader = true; } else if (value.NCZObjectType == typeof(NCZVersion)) { HasVersion = true; } //else if (value.NCZObjectType == typeof(NCZVisibleExtent)) // HasVisibleExtent = true; //else if (value.NCZObjectType == typeof(NCZMetadata)) // HasMetadata = true; else if (value.NCZObjectType == typeof(NCZUserInfo)) { HasMetadata = true; } _list.Add(value); }
public override void Load(System.IO.BinaryReader br, bool loadByteArray) { long position = br.BaseStream.Position; base.Load(br, loadByteArray); byte first = br.ReadByte(); byte second = br.ReadByte(); bool isGeom = true; for (int i = 0; i < 3; i++) { byte checkByte = br.ReadByte(); if (checkByte != 0) { isGeom = false; break; } } if (isGeom) { NCZGeometryTypes geomType = (NCZGeometryTypes)Enum.Parse(typeof(NCZGeometryTypes), br.ReadByte().ToString()); switch (geomType) { case NCZGeometryTypes.Unknown: break; case NCZGeometryTypes.Point: NCZPoint p = new NCZPoint(); p.Load(br, false); _geometry = p; break; //case NCZGeometryTypes.Line: // //NCZLine line = new NCZLine(); // //line.Load(br, false); // //_geometry = line; // break; //case NCZGeometryTypes.Circle: // break; //case NCZGeometryTypes.Arc: // break; //case NCZGeometryTypes.Text: // break; //case NCZGeometryTypes.Symbol: // break; //case NCZGeometryTypes.Polyline: // //this part is included in the original project // break; //case NCZGeometryTypes.Box: // break; default: br.BaseStream.Position = position; break; } } else { br.BaseStream.Position = position; } }
public int IndexOf(BaseNCZObject value) { return(_list.IndexOf(value)); }