Example #1
0
 /// <summary>
 /// Add text to paragraph contents
 /// </summary>
 public void AppendText(RtfParagraphContentBase text)
 {
     if (paragraphs.Count == 0)
     {
         contents.Add(text);
     }
     else
     {
         paragraphs[paragraphs.Count - 1].AppendText(text);
     }
 }
Example #2
0
 /// <summary>
 /// Adds a new ESCommon.Rtf.RtfTableCell with specified text to the collection.
 /// </summary>
 public void Add(RtfParagraphContentBase text)
 {
     this.Add(new RtfTableCell(text));
 }
Example #3
0
 /// <param name="text">Text to add to paragraph contents.</param>
 public RtfParagraph(RtfParagraphContentBase text) : base(text)
 {
 }
Example #4
0
 /// <summary>
 /// Add a new paragraph with inherited formatting
 /// </summary>
 public void AppendParagraph(RtfParagraphContentBase text)
 {
     this.AppendParagraph(new RtfParagraph(text));
 }
Example #5
0
 /// <param name="text">Text to add to paragraph contents.</param>
 public RtfParagraphBase(RtfParagraphContentBase text) : this()
 {
     AppendText(text);
 }
 /// <param name="text">Text to add to paragraph contents</param>
 /// <param name="formatting">Paragraph formatting</param>
 public RtfFormattedParagraph(RtfParagraphContentBase text, RtfParagraphFormatting formatting) : base(text)
 {
     _formatting = formatting;
 }
Example #7
0
        /// <summary>
        /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
        /// </summary>
        /// <param name="width">Cell width in centimeters.</param>
        /// <param name="text">Text displayed in the cell.</param>
        /// <param name="style">Style applied to the cell.</param>
        public RtfTableCell(float width, RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting)
        {
            Initialize(style);

            _definition.Width = TwipConverter.ToTwip(width, MetricUnit.Centimeter);
        }
Example #8
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
 /// </summary>
 /// <param name="text">Text displayed in the cell.</param>
 /// <param name="style">Style applied to the cell.</param>
 public RtfTableCell(RtfParagraphContentBase text, RtfTableCellStyle style) : base(text, style.DefaultParagraphFormatting)
 {
     Initialize(style);
 }
Example #9
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
 /// </summary>
 /// <param name="width">Cell width in centimeters.</param>
 /// <param name="text">Text displayed in the cell.</param>
 public RtfTableCell(float width, RtfParagraphContentBase text) : base(text)
 {
     Initialize();
     _definition.Width = TwipConverter.ToTwip(width, MetricUnit.Centimeter);
 }
Example #10
0
 /// <summary>
 /// Initializes a new instance of ESCommon.Rtf.RtfTableCell class.
 /// </summary>
 /// <param name="text">Text displayed in the cell.</param>
 public RtfTableCell(RtfParagraphContentBase text) : base(text)
 {
     Initialize();
 }