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