public ConOut Print(string content, ConColor color = null) { void Process() { Console.Write(content); } if (color is null) { Process(); } else { var originColor = ConColor; ConColor = color; Process(); ConColor = originColor; } return(this); }
public static ConOut Center(string line, ConColor color = null) => Instance.Center(line, color);
public static ConOut Right(string line, ConColor color = null) => Instance.Right(line, color);
public static ConOut Left(string line, ConColor color = null) => Instance.Left(line, color);
public static ConOut Print(string content, ConColor color = null) => Instance.Print(content, color);
public static ConOut Line(string content, ConColor color = null) => Instance.Line(content, color);
public ConOut Center(string line, ConColor color = null) { RowBeginning(); Print($"{line.Center(Console.WindowWidth)}", color); return(this); }
public ConOut Right(string line, ConColor color = null) { RowBeginning(); Print($"{" ".Repeat(Console.WindowWidth - line.GetLengthA())}{line}", color); return(this); }
public ConOut Line(string content, ConColor color = null) { Print(content, color); Console.WriteLine(); return(this); }