예제 #1
0
 public void SetColors(ConsoleFontColor style)
 {
     this.SetColors(style.ForeColor, style.BgColor);
 }
예제 #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);
        }
예제 #3
0
 public void WriteText(ConsoleFontColor colors, string text)
 {
     this.SetColors(colors.ForeColor, colors.BgColor);
     Console.Write(text);
 }
예제 #4
0
 public bool WriteTextBox(Rectangle textArea, string text, ConsoleFontColor colorDef)
 {
     return(this.WriteTextBox(textArea.X, textArea.Y, textArea.Width, textArea.Height, text, colorDef));
 }