Пример #1
0
        public Item(EpubFile belongTo, EpubFileEntry entry, string id, string mediaType, string properties)
        {
            this.belongTo   = belongTo;
            this.id         = id;
            this.mediaType  = mediaType;
            this.properties = properties;
            string dir = Path.GetDirectoryName(belongTo.packageFile.fullName);

            href = Path.GetRelativePath(dir, entry.fullName).Replace('\\', '/');
        }
Пример #2
0
 public Item(XmlElement e, EpubFile belongTo, string packageFilePath)
 {
     this.belongTo = belongTo;
     href          = e.GetAttribute("href");
     id            = e.GetAttribute("id");
     mediaType     = e.GetAttribute("media-type");
     properties    = e.GetAttribute("properties");
     if (href[0] != '/')
     {
         string dir = Path.GetDirectoryName(packageFilePath);
         if (dir != "")
         {
             filePath = Path.GetDirectoryName(packageFilePath) + "/" + href;
         }
     }
     else
     {
         filePath = href;
     }
 }
Пример #3
0
 public EpubFile(EpubFile e)
 {
     //todo
 }