Пример #1
0
        /// <summary>
        /// Creates a given Section following a set of attributes and adds it to this one.
        /// </summary>
        /// <param name="attributes">the attributes</param>
        /// <returns>the newly added Section</returns>
        public Section addSection(Properties attributes)
        {
            Section section = new Section(new Paragraph(""), 1);
            string  value;

            if ((value = attributes.Remove(ElementTags.NUMBER)) != null)
            {
                subsections = int.Parse(value) - 1;
            }
            if ((value = attributes.Remove(ElementTags.BOOKMARKOPEN)) != null)
            {
                this.BookmarkOpen = bool.Parse(value);
            }
            section.set(attributes);
            Add(section);
            return(section);
        }