예제 #1
0
        public override void Read(BinaryReader reader)
        {
            base.Read(reader);

            byte[] body = reader.ReadBytes(HeaderOne - 12);

            int numDataObjects = ToInt32(body, 0);
            int numAlbums      = ToInt32(body, 4);

            PlaylistId = ToInt32(body, 8);
            unknownOne = ToInt32(body, 12);
            unknownTwo = ToInt16(body, 16);
            IsMaster   = body[18] == (byte)1;

            PlayMusic           = body[19] == (byte)1;
            Repeat              = body[20] == (byte)1;
            Random              = body[21] == (byte)1;
            ShowTitles          = body[22] == (byte)1;
            TransitionDirection = body[23];
            SlideDuration       = ToInt32(body, 24);
            TransitionDuration  = ToInt32(body, 28);
            unknownThree        = ToInt32(body, 32);
            unknownFour         = ToInt32(body, 36);
            TrackId             = ToInt64(body, 40);
            PreviousPlaylistId  = ToInt32(body, 48);

            recordPadding = body.Length - 52;

            for (int i = 0; i < numDataObjects; i++)
            {
                PhotoDetailRecord detail = new PhotoDetailRecord(IsBE);
                detail.Read(reader);
                detail.BrokenChildPadding = true;

                if (i == 0)
                {
                    nameRecord = detail;
                }
            }

            items.Clear();

            for (int i = 0; i < numAlbums; i++)
            {
                AlbumItemRecord item = new AlbumItemRecord(IsBE);
                item.Read(reader);

                AddItem(item);
            }
        }
예제 #2
0
 public void RemoveItem(AlbumItemRecord item)
 {
     items.Remove(item.Id);
 }
예제 #3
0
 public void AddItem(AlbumItemRecord item)
 {
     items[item.Id] = item;
 }