示例#1
0
        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);
        }
示例#2
0
        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);
        }