Esempio n. 1
0
        public Dictionary <string, string> BuildScrToTitleMap()
        {
            var map = new Dictionary <string, string>();

            TocEntry.AddToScrToTitleMap(map, Entries);
            return(map);
        }
Esempio n. 2
0
 public TocEntry CopyTocEntry(TocEntry entry)
 {
     return(new TocEntry()
     {
         Title = entry.Title,
         Item = GetUpdatedItem(entry.Item),
         Children = CopyTocEntries(entry.Children)
     });
 }
Esempio n. 3
0
 public void InsertChapter(EpubItem chapter, TocEntry tocEntry, EpubItem preceedingItem)
 {
     Opf.InsertChapter(new List <EpubItem>()
     {
         chapter
     }, preceedingItem);
     ToC.InsertChapter(new List <TocEntry>()
     {
         tocEntry
     }, preceedingItem);
 }
Esempio n. 4
0
        public void InsertChapter()
        {
            var newChapter = new EpubItem()
            {
                Id           = textBoxId.Text,
                AbsolutePath = textBoxPath.Text,
                MediaType    = Epub.XhtmlMedia,
                RawBytes     = Encoding.UTF8.GetBytes(Epub.EmptyXhtmlDoc),
                Source       = textBoxSource.Text
            };
            var newTocEntry = new TocEntry()
            {
                Title = textBoxTitle.Text,
                Item  = newChapter
            };

            epub.InsertChapter(newChapter, newTocEntry, itemToInsertBefore);
        }
Esempio n. 5
0
 public int CalcNavMapDepth()
 {
     return(TocEntry.CalcNavMapDepth(Entries));
 }
Esempio n. 6
0
 public (List <TocEntry> entries, int index) FindTocEntry(string src)
 {
     return(TocEntry.FindTocEntry(Entries, src));
 }