コード例 #1
0
ファイル: PhotoDatabase.cs プロジェクト: dstaley/ipod-sharp
        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);
            }
        }
コード例 #2
0
ファイル: PhotoDatabase.cs プロジェクト: dstaley/ipod-sharp
 public PhotoDetailRecord(bool isbe, PhotoDetailType type) : this(isbe, null, type)
 {
 }
コード例 #3
0
ファイル: PhotoDatabase.cs プロジェクト: dstaley/ipod-sharp
 public PhotoDetailRecord(bool isbe, ImageNameRecord name, PhotoDetailType type) : this(isbe) {
     Type      = PhotoDetailType.ThumbnailContainer;
     ImageName = name;
     Type      = type;
 }