Example #1
0
 public void SetColors(ConsoleFontColor style)
 {
     this.SetColors(style.ForeColor, style.BgColor);
 }
Example #2
0
        public bool WriteTextBox(int x, int y, int boxWidth, int boxHeight, string text, ConsoleFontColor colorDef)
        {
            this.LimitBoxDimensions(x, y, ref boxWidth, ref boxHeight); // so do not have to check for this every line is drawn...
            this._console.PositionCursor(x, y);
            this._console.SetColors(colorDef.ForeColor, colorDef.BgColor);

            string[] lines = this.SplitText(text, boxWidth);
            int      i;

            for (i = 0; i < lines.Length && i < boxHeight; ++i)
            {
                this._console.PositionCursor(x, y + i);
                this.WriteJustified(lines[i], boxWidth);
            }

            return(i == lines.Length);
        }
Example #3
0
 public void WriteText(ConsoleFontColor colors, string text)
 {
     this.SetColors(colors.ForeColor, colors.BgColor);
     Console.Write(text);
 }
Example #4
0
 public bool WriteTextBox(Rectangle textArea, string text, ConsoleFontColor colorDef)
 {
     return(this.WriteTextBox(textArea.X, textArea.Y, textArea.Width, textArea.Height, text, colorDef));
 }