addChildSection() public method

public addChildSection ( TOCReference childSection ) : TOCReference
childSection TOCReference
return TOCReference
Ejemplo n.º 1
0
 /// <summary>
 /// Adds the resource to the table of contents of the book as a child section of
 /// the given parentSection
 /// </summary>
 /// <param name="parentSection"></param>
 /// <param name="sectionTitle"></param>
 /// <param name="resource"></param>
 public TOCReference addSection(TOCReference parentSection, string sectionTitle, Resource resource)
 {
     getResources().add(resource);
     if (spine.findFirstResourceById(resource.getId()) < 0)
     {
         spine.addSpineReference(new SpineReference(resource));
     }
     return parentSection.addChildSection(new TOCReference(sectionTitle, resource));
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Adds the resource to the table of contents of the book as a child section of
 /// the given parentSection
 /// </summary>
 /// <param name="parentSection"></param>
 /// <param name="sectionTitle"></param>
 /// <param name="resource"></param>
 public TOCReference addSection(TOCReference parentSection, string sectionTitle, Resource resource)
 {
     getResources().add(resource);
     if (spine.findFirstResourceById(resource.getId()) < 0)
     {
         spine.addSpineReference(new SpineReference(resource));
     }
     return parentSection.addChildSection(new TOCReference(sectionTitle, resource));
 }