public void ClearRow()
        {
            _grid.Fill('H');

            _grid.ClearRow(5);

            for (var i = 0; i < _grid[5].Count(); i++)
            {
                Assert.AreEqual(' ', _grid[5][i]);
            }
        }
Beispiel #2
0
        // Clearing
        /// <summary>
        /// Remove a line from the text.
        /// </summary>
        /// <param name="index">The index of the line to remove.</param>
        public void ClearLine(int index)
        {
            if (Tools.CheckError(index < 0, $"Index [{index}] cannot be negative."))
            {
                return;
            }
            if (Tools.CheckError(index > _size.rows - 1, $"Index [{index}] is higher than lines on the layer."))
            {
                return;
            }

            textGrid.ClearRow(index);
            Change();
        }