예제 #1
0
        public TextColumnsComposer(List <string[]> columnsData)
        {
            _defaultColumnSpecs = new TextColumnSpecs();
            _defaultRowSpecs    = new TextRowSpecs();

            Reset(columnsData);
        }
예제 #2
0
        public TextColumnsComposer(int columnsCount)
        {
            _defaultColumnSpecs = new TextColumnSpecs();
            _defaultRowSpecs    = new TextRowSpecs();

            Reset(columnsCount);
        }
예제 #3
0
        public TextColumnsComposer SetColumnAlignment(TextColumnAlignment alignment, int columnIndex)
        {
            if (columnIndex < 0 || columnIndex >= _columnsData.Length)
            {
                throw new IndexOutOfRangeException();
            }

            TextColumnSpecs columnSpecs;

            if (_columnSpecsDictionary.TryGetValue(columnIndex, out columnSpecs) == false)
            {
                columnSpecs = new TextColumnSpecs();
                _columnSpecsDictionary.Add(columnIndex, columnSpecs);
            }

            columnSpecs.Alignment = alignment;

            return(this);
        }