Esempio n. 1
0
        public virtual BblLibraryNode AddChildFile(FileInfoEx info)
        {
            if (info.Parent.FullName != Path)
            {
                return(null);
            }
            if (IsArchiveFileExtension(info.Extension) || IsPDF(info.Extension))
            {
                BblLibraryNode b = null;
                if (IsArchiveFileExtension(info.Extension))
                {
                    b = new BblBookArchive(Root, this, info);
                }
                else if (IsPDF(info.Extension))
                {
                    b = new BblBookPdf(Root, this, info);
                }
                AddChild(b);
                return(b);
            }
            else if (IsImageFileExtension(info.Extension) && !IsBook && IsFolder && (_children == null || _children.Count == 0))
            {
                Root.AddPromotable(this);
            }

            return(null);
        }
Esempio n. 2
0
 public BblArchive(BblBookArchive book)
 {
     _book   = book;
     IsValid = true;
 }