Beispiel #1
0
        public static SubRecord Read(Stream stream)
        {
            SubRecord record = SubRecord.ReadBase(stream);

            switch (record.Type)
            {
            case SubRecordType.CommonObjectData:
                return(new CommonObjectData(record));

            case SubRecordType.End:
                return(new End(record));

            case SubRecordType.GroupMarker:
                return(new GroupMarker(record));

            case SubRecordType.ClipboardFormat:
                return(new ClipboardFormat(record));

            case SubRecordType.PictureOption:
                return(new PictureOption(record));

            default:
                return(record);
            }
        }
Beispiel #2
0
        public new static SubRecord ReadBase(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);
            SubRecord    record = new SubRecord();

            record.Type = reader.ReadUInt16();
            record.Size = reader.ReadUInt16();
            record.Data = reader.ReadBytes(record.Size);
            return(record);
        }
Beispiel #3
0
        public override void Decode()
        {
            MemoryStream stream = new MemoryStream(Data);

            SubRecords.Clear();
            while (stream.Position < Size)
            {
                SubRecord subRecord = SubRecord.Read(stream);
                subRecord.Decode();
                SubRecords.Add(subRecord);
            }
        }
Beispiel #4
0
 public GroupMarker(SubRecord record) : base(record)
 {
 }
Beispiel #5
0
 public ClipboardFormat(SubRecord record) : base(record)
 {
 }
Beispiel #6
0
 public CommonObjectData(SubRecord record) : base(record)
 {
 }
Beispiel #7
0
 public PictureOption(SubRecord record) : base(record)
 {
 }
Beispiel #8
0
 public SubRecord(SubRecord record) : base(record)
 {
 }
Beispiel #9
0
 public End(SubRecord record) : base(record)
 {
 }