TODO: Update summary.
상속: INotifyPropertyChanged
예제 #1
0
        /// <summary>
        /// Builds the list of pages
        /// </summary>
        private void BuildPageList()
        {
            Queue <DirmComponent> pageHeaders = new Queue <DirmComponent>(Directory.Components.Where(x => x.IsPage));
            Queue <TH44Chunk>     thumbnail   = new Queue <TH44Chunk>(FormChunk.GetChildrenItems <TH44Chunk>());

            DjviChunk[] sharedItems = FormChunk.GetChildrenItems <DjviChunk>();

            List <DjvuPage> pages = new List <DjvuPage>();

            int pageCount = 1;

            foreach (IFFChunk child in FormChunk.Children)
            {
                if (child is FormChunk)
                {
                    FormChunk form = (FormChunk)child;

                    if (form.Children.Any(x => x.ChunkType == ChunkTypes.Form_Djvu))
                    {
                        DirmComponent currentHeader    = pageHeaders.Count() > 0 ? pageHeaders.Dequeue() : null;
                        TH44Chunk     currentThumbnail = thumbnail.Count() > 0 ? thumbnail.Dequeue() : null;
                        DjvuPage      newPage          = new DjvuPage(pageCount++, this, currentHeader, currentThumbnail, sharedItems, form);

                        pages.Add(newPage);
                    }
                }
            }

            Pages = pages.ToArray();
        }
예제 #2
0
        internal void AddPage(Queue <ITH44Chunk> thumbnails, DjvuChunk page)
        {
            ITH44Chunk thumbnail = thumbnails?.Count > 0 ? thumbnails.Dequeue() : null;
            DjvuPage   newPage   = new DjvuPage(_Pages.Count + 1, this, null, thumbnail, Includes, page);

            _Pages.Add(newPage);
        }
예제 #3
0
        internal void AddPage(DjvuFormElement page)
        {
            DjvuPage newPage = new DjvuPage(_Pages.Count + 1, this, null, null, Includes, page);

            _Pages.Add(newPage);
        }