예제 #1
0
        public static new 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);
            }
        }
예제 #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;
 }
예제 #3
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);
        }
예제 #4
0
        public new static SubRecord ReadBase(Stream stream)
        {
            BinaryReader binaryReader = new BinaryReader(stream);
            SubRecord    subRecord    = new SubRecord();

            subRecord.Type = binaryReader.ReadUInt16();
            subRecord.Size = binaryReader.ReadUInt16();
            subRecord.Data = binaryReader.ReadBytes((int)subRecord.Size);
            return(subRecord);
        }
예제 #5
0
        public override void Decode()
        {
            MemoryStream memoryStream = new MemoryStream(this.Data);

            this.SubRecords.Clear();
            while (memoryStream.Position < (long)((ulong)this.Size))
            {
                SubRecord subRecord = SubRecord.Read(memoryStream);
                subRecord.Decode();
                this.SubRecords.Add(subRecord);
            }
        }
예제 #6
0
파일: OBJ.cs 프로젝트: enijkamp/pokerbot
        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);
            }
        }
예제 #7
0
        public new static SubRecord Read(Stream stream)
        {
            SubRecord subRecord = SubRecord.ReadBase(stream);
            ushort    type      = subRecord.Type;
            SubRecord result;

            if (type != 0)
            {
                switch (type)
                {
                case 6:
                    result = new GroupMarker(subRecord);
                    break;

                case 7:
                    result = new ClipboardFormat(subRecord);
                    break;

                case 8:
                    result = new PictureOption(subRecord);
                    break;

                default:
                    if (type != 21)
                    {
                        result = subRecord;
                    }
                    else
                    {
                        result = new CommonObjectData(subRecord);
                    }
                    break;
                }
            }
            else
            {
                result = new End(subRecord);
            }
            return(result);
        }
예제 #8
0
 public CommonObjectData(SubRecord record)
     : base(record)
 {
 }
예제 #9
0
 public PictureOption(SubRecord record)
     : base(record)
 {
 }
예제 #10
0
		public ClipboardFormat(SubRecord record) : base(record) { }
예제 #11
0
 public CommonObjectData(SubRecord record) : base(record)
 {
 }
예제 #12
0
 public ClipboardFormat(SubRecord record) : base(record)
 {
 }
예제 #13
0
 public GroupMarker(SubRecord record) : base(record)
 {
 }
예제 #14
0
 public SubRecord(SubRecord record) : base(record)
 {
 }
예제 #15
0
 public SubRecord(SubRecord record) : base(record) { }
예제 #16
0
		public End(SubRecord record) : base(record) { }
예제 #17
0
파일: End.cs 프로젝트: enijkamp/pokerbot
 public End(SubRecord record) : base(record)
 {
 }
예제 #18
0
		public GroupMarker(SubRecord record) : base(record) { }
예제 #19
0
		public PictureOption(SubRecord record) : base(record) { }