Beispiel #1
0
        /// <summary>
        /// Writes text into the output buffer and depending on the [fill] param clears and fills the whole line first with selected colors.
        /// </summary>
        /// <param name="text"></param>
        /// <returns></returns>
        public WriteRef Write(string text, Color backgroundColor, Color foregroundColor, bool fill)
        {
            int textLen = text != null ? text.Length : 0;
            int len     = fill ? Options.BufferSize.X : textLen;

            AlterLine(text, this.currentBufferSize.Y, this.currentBufferSize.X, len, backgroundColor, foregroundColor);

            var @ref = new WriteRef(this.currentBufferSize.Y, this.currentBufferSize.X, textLen);

            currentBufferSize.X += text.Length;

            return(@ref);
        }
Beispiel #2
0
 private void FillRegion()
 {
     progressBarRegion.WriteLine(" ", progressBarRegion.BackgroundColor, progressBarRegion.ForegroundColor, true);
     @ref = progressBarRegion.WriteLine(" ", progressBarRegion.BackgroundColor, progressBarRegion.ForegroundColor, true);
     progressBarRegion.WriteLine(" ", progressBarRegion.BackgroundColor, progressBarRegion.ForegroundColor, true);
 }