public override Stream UnParse() { MemoryStream ms = new MemoryStream(); BinaryWriter w = new BinaryWriter(ms); w.Write(tag); w.Write(version); if (footprintAreas == null) { footprintAreas = new AreaList(OnRCOLChanged, version); } footprintAreas.UnParse(ms); if (slotAreas == null) { slotAreas = new AreaList(OnRCOLChanged, version); } slotAreas.UnParse(ms); return(ms); }
public override Stream UnParse() { MemoryStream ms = new MemoryStream(); BinaryWriter w = new BinaryWriter(ms); w.Write(tag); w.Write(version); w.Write(instance); w.Write(type); w.Write(group); if (type != 0) { if (minHeightOverrides == null) { minHeightOverrides = new PolygonHeightOverrideList(OnRCOLChanged); } minHeightOverrides.UnParse(ms); if (maxHeightOverrides == null) { maxHeightOverrides = new PolygonHeightOverrideList(OnRCOLChanged); } maxHeightOverrides.UnParse(ms); } else { if (footprintAreas == null) { footprintAreas = new AreaList(OnRCOLChanged, version); } footprintAreas.UnParse(ms); if (slotAreas == null) { slotAreas = new AreaList(OnRCOLChanged, version); } slotAreas.UnParse(ms); w.Write(maxHeight); w.Write(minHeight); } return(ms); }