iTextSharp.text.Section.Set C# (CSharp) Метод

Set() публичный Метод

Alters the attributes of this Section.
public Set ( Properties attributes ) : void
attributes System.util.Properties the attributes
Результат void
        public void Set(Properties attributes) {
            string value;
            if ((value = attributes.Remove(ElementTags.NUMBERDEPTH)) != null) {
                NumberDepth = int.Parse(value);
            }
            if ((value = attributes.Remove(ElementTags.INDENT)) != null) {
                Indentation = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
            }
            if ((value = attributes.Remove(ElementTags.INDENTATIONLEFT)) != null) {
                IndentationLeft = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
            }
            if ((value = attributes.Remove(ElementTags.INDENTATIONRIGHT)) != null) {
                IndentationRight = float.Parse(value, System.Globalization.NumberFormatInfo.InvariantInfo);
            }
        }
    

Usage Example

Пример #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 virtual 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;
 }
All Usage Examples Of iTextSharp.text.Section::Set