Esempio n. 1
0
        /// <summary>
        /// Fills characters at a given cursor position.
        /// </summary>
        /// <param name="c">The character to write.</param>
        /// <param name="numChars">The number of character cells to be filled with the character.</param>
        /// <param name="x">The column position where the fill operation is to start.</param>
        /// <param name="y">The row position where the fill operation is to start.</param>
        /// <returns>The number of character cells in which the character was written.</returns>
        public int FillCharXY(Char c, int numChars, int x, int y)
        {
            Coord pos          = new Coord((short)x, (short)y);
            int   charsWritten = 0;

            if (!WinCon.FillConsoleOutputCharacter(_handle, c, numChars, pos, ref charsWritten))
            {
                throw new ApplicationException("Error writing attributes");
            }
            return(charsWritten);
        }