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)); }
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); } }
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); } }
public void RemoveAlbum(AlbumRecord album) { albums.Remove(album); }
public void AddAlbum(AlbumRecord album) { albums.Add(album); }