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