Пример #1
0
        /// <summary>
        /// Returns a copy of the instance.
        /// </summary>
        public TextGridFormat Clone()
        {
            var clone = new TextGridFormat();

            clone.Align    = this.Align;
            clone.Width    = this.Width;
            clone.FillChar = this.FillChar;

            return(clone);
        }
Пример #2
0
 /// <summary>
 /// Sets the format to use for a specific cell.
 /// </summary>
 /// <param name="x">The cell's X coordinate.</param>
 /// <param name="y">The cell's Y coordinate.</param>
 /// <param name="format">The cell format.</param>
 public void SetCellFormat(int x, int y, TextGridFormat format)
 {
     cellFormats[string.Format("[{0},{1}]", x, y)] = format;
 }
Пример #3
0
 /// <summary>
 /// Sets the default cell format for a column.
 /// </summary>
 /// <param name="x">The column.</param>
 /// <param name="format">The cell format.</param>
 public void SetColumnFormat(int x, TextGridFormat format)
 {
     colFormats[x] = format;
 }