예제 #1
0
        private Album CreateAlbum()
        {
            AlbumRecord record = new AlbumRecord(device.IsBE);

            AlbumListRecord albumList = dfr[PhotoDataSetIndex.AlbumList].Data as AlbumListRecord;

            albumList.AddAlbum(record);

            return(new Album(record, this));
        }
예제 #2
0
파일: Album.cs 프로젝트: dstaley/ipod-sharp
        internal Album(AlbumRecord record, PhotoDatabase db)
        {
            this.record = record;

            photos = new List <Photo> ();

            foreach (AlbumItemRecord item in record.Items)
            {
                Photo photo = db.LookupPhotoById(item.Id);
                photos.Add(photo);
            }
        }
예제 #3
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            if (HeaderOne - 12 > 0)
            {
                byte[] body = reader.ReadBytes(HeaderOne - 12);
                recordPadding = body.Length;
            }

            albums.Clear();

            int numChildren = HeaderTwo;

            for (int i = 0; i < numChildren; i++)
            {
                AlbumRecord record = new AlbumRecord(IsBE);
                record.Read(reader);
                albums.Add(record);
            }
        }
예제 #4
0
 public void RemoveAlbum(AlbumRecord album)
 {
     albums.Remove(album);
 }
예제 #5
0
 public void AddAlbum(AlbumRecord album)
 {
     albums.Add(album);
 }