Exemplo n.º 1
0
 public TPageCollection(TPageCollection pages)
 {
     if (pages != null)
     {
         foreach (TPage PageItem in pages)
         {
             this.Add(new TPage(PageItem));
         }
     }
 }
Exemplo n.º 2
0
 public TBook(XElement book)
 {
     Name       = book.SafeReadAttribute <string>(TAG_ATTRIBUTE_NAME, "");
     Pathname   = book.SafeReadElementValue <string>(TAG_ELEMENT_PATHNAME, "");
     Category   = book.SafeReadElementValue <string>(TAG_ELEMENT_GROUPNAME, "");
     Author     = book.SafeReadAttribute <string>(TAG_ATTRIBUTE_AUTHOR, "");
     IsExcluded = book.SafeReadAttribute <bool>("IsExcluded", false);
     BookType   = (BookTypeEnum)Enum.Parse(typeof(BookTypeEnum), book.SafeReadAttribute <string>(TAG_ATTRIBUTE_BOOKTYPE, "unknown"));
     try { Pages = new TPageCollection(book.Element("Pages")); } catch { Pages = null; }
 }
Exemplo n.º 3
0
 public TBook()
 {
     Name       = "";
     Pathname   = "";
     Author     = "";
     IsExcluded = false;
     BookType   = BookTypeEnum.unknown;
     Pages      = new TPageCollection();
     Category   = "";
 }
Exemplo n.º 4
0
 public TBook(TBook book)
 {
     Name       = book.Name;
     Pathname   = book.Pathname;
     Author     = book.Author;
     IsExcluded = book.IsExcluded;
     BookType   = book.BookType;
     Pages      = new TPageCollection(book.Pages);
     Category   = book.Category;
 }
Exemplo n.º 5
0
 public bool IsIdentical(TPageCollection otherPages)
 {
     if (otherPages == null || this.Count != otherPages.Count)
     {
         return(false);
     }
     foreach (TPage PageItem in this)
     {
         if (!PageItem.IsIdentical(otherPages.Find(p => p.Name == PageItem.Name)))
         {
             return(false);
         }
     }
     return(true);
 }