Exemple #1
0
 /// <summary>
 /// Get First And Last  TOCNode
 /// </summary>
 /// <param name="treeNode"></param>
 /// <returns>item1:firstNode,item2:lastnode</returns>
 public Tuple <TOCNode, TOCNode> GetFirstAndLastTOCNode(TOCNode treeNode)
 {
     if (treeNode != null)
     {
         var node = treeNode.GetRootTOCNode();
         if (node != null)
         {
             return(new Tuple <TOCNode, TOCNode>(node.GetFirstPage(), node.GetLastPage()));
         }
     }
     return(null);
 }
Exemple #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="currentTOCNode">full tree node</param>
 /// <returns>null:have come to the last page</returns>
 public TOCNode GetNextPageByTreeNode(TOCNode currentTOCNode)
 {
     if (currentTOCNode != null)
     {
         var rootNode = currentTOCNode.GetRootTOCNode();
         if (rootNode != null)
         {
             return(publicationContentService.GetNextTOCNode(currentTOCNode.ID, currentTOCNode.ID, rootNode, true));
         }
     }
     return(null);
 }
Exemple #3
0
 /// <summary>
 /// get toc node by tocid and a full node tree from GetTOCByBookId
 /// </summary>
 /// <param name="tocId">tocId</param>
 /// <param name="rootTOCNode">root node  from GetTOCByBookId</param>
 /// <returns></returns>
 public TOCNode GetTOCByTOCId(int tocId, TOCNode rootTOCNode)
 {
     if (rootTOCNode != null)
     {
         var node = rootTOCNode.GetRootTOCNode();
         if (node != null)
         {
             return(publicationContentService.GetTOCByTOCId(tocId, node));
         }
     }
     return(null);
 }