예제 #1
0
        public void Replay(IDocumentConsumer con)
        {
            int f = 0;

            for (int b = 0; b < blocks.Count; b++)
            {
            while (f < blocks[b].FragmentIndex)
            con.PushFragment(fragments[f++]);

            con.PushBlock(blocks[b].Content);
            }

            while (f < fragments.Count)
            con.PushFragment(fragments[f++]);

            con.Close();
        }
예제 #2
0
파일: NCX.cs 프로젝트: Ripper555/saraswati
        public static void PrintToc(TableOfContents toc,
				    IDocumentConsumer doc,
				    int depthLimit = -1)
        {
            doc.PushBlock(new Block());
            doc.PushFragment(new Fragment() {
            Attr = Fragment.Attributes.Heading,
            Text = toc.Title
            });

            for (int i = toc.FirstRoot(); i >= 0; i = toc.NextSibling(i))
            PrintEntry(toc, doc, i, 0, depthLimit);

            doc.Close();
        }