示例#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
        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);
 }