Пример #1
0
        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);
        }
Пример #2
0
 public static ConOut Center(string line, ConColor color   = null) => Instance.Center(line, color);
Пример #3
0
 public static ConOut Right(string line, ConColor color    = null) => Instance.Right(line, color);
Пример #4
0
 public static ConOut Left(string line, ConColor color     = null) => Instance.Left(line, color);
Пример #5
0
 public static ConOut Print(string content, ConColor color = null) => Instance.Print(content, color);
Пример #6
0
 public static ConOut Line(string content, ConColor color  = null) => Instance.Line(content, color);
Пример #7
0
 public ConOut Center(string line, ConColor color = null)
 {
     RowBeginning();
     Print($"{line.Center(Console.WindowWidth)}", color);
     return(this);
 }
Пример #8
0
 public ConOut Right(string line, ConColor color = null)
 {
     RowBeginning();
     Print($"{" ".Repeat(Console.WindowWidth - line.GetLengthA())}{line}", color);
     return(this);
 }
Пример #9
0
 public ConOut Line(string content, ConColor color = null)
 {
     Print(content, color);
     Console.WriteLine();
     return(this);
 }