Exemplo n.º 1
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            byte[] body = reader.ReadBytes(this.HeaderOne - 12);
            Type = (PhotoDetailType)ToInt16(body, 0);

            switch (Type)
            {
            case PhotoDetailType.ThumbnailContainer:
            case PhotoDetailType.ImageContainer:
                ImageName = new ImageNameRecord(IsBE);
                ImageName.Read(reader);
                break;

            case PhotoDetailType.FileName:
                ReadString(reader, true);
                break;

            case PhotoDetailType.String:
                ReadString(reader, false);
                break;

            default:
                throw new DatabaseReadException("Unknown detail type: " + Type);
            }
        }
Exemplo n.º 2
0
 public PhotoDetailRecord(bool isbe, PhotoDetailType type) : this(isbe, null, type)
 {
 }
Exemplo n.º 3
0
 public PhotoDetailRecord(bool isbe, ImageNameRecord name, PhotoDetailType type) : this(isbe) {
     Type      = PhotoDetailType.ThumbnailContainer;
     ImageName = name;
     Type      = type;
 }