Click here to Skip to main content
12,695,694 members (28,759 online)
Click here to Skip to main content

Tagged as

Stats

105.4K views
3.6K downloads
100 bookmarked
Posted

RTF Document Constructor Library

, 16 Aug 2010 CPOL
Create Rich Text Format documents programatically.
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;

namespace ESCommon.Rtf
{
    /// <summary>
    /// Represents a collection of cell definitions in a ESCommon.Rtf.RtfTableRow
    /// </summary>
    public class RtfTableCellDefinitionCollection : IEnumerable<RtfTableCellDefinition>
    {
        private RtfTableRow Row;
        private List<RtfTableCellDefinition> list;

        /// <summary>
        /// Gets ESCommon.Rtf.RtfTableCellDefinition at specified location.
        /// </summary>
        /// <param name="index">A zero-based index of ESCommon.Rtf.RtfTableCellDefinition to get.</param>
        public RtfTableCellDefinition this[int index]
        {
            get { return list[index]; }
        }

        /// <summary>
        /// Gets the number of cell definitions in the collection.
        /// </summary>
        public int Count
        {
            get { return list.Count; }
        }


        /// <summary>
        /// Initializes a new instance of ESCommon.Rtf.RtfTableCellDefinitionCollection class.
        /// </summary>
        /// <param name="row">Owning row.</param>
        internal RtfTableCellDefinitionCollection(RtfTableRow row)
        {
            list = new List<RtfTableCellDefinition>();
            Row = row;
        }


        /// <summary>
        /// Adds the specified ESCommon.Rtf.RtfTableCellDefinition to the collection.
        /// </summary>
        internal void AddInternal(RtfTableCellDefinition rtfTableCellDefinition)
        {
            list.Add(rtfTableCellDefinition);
        }


        IEnumerator<RtfTableCellDefinition> IEnumerable<RtfTableCellDefinition>.GetEnumerator()
        {
            return list.GetEnumerator();
        }

        IEnumerator IEnumerable.GetEnumerator()
        {
            return list.GetEnumerator();
        }

    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Dima Popov
Software Developer Energoservice
Russian Federation Russian Federation
Dmitry lives in Arkhangelsk, Russia. He has developed C# applications since 2007.

You may also be interested in...

Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170118.1 | Last Updated 16 Aug 2010
Article Copyright 2010 by Dima Popov
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid