RaspberryIO/Unosquare.Swan.Lite/Terminal.Graphics.cs
2019-12-04 17:10:06 +01:00

45 lines
1.4 KiB
C#

using System;
namespace Unosquare.Swan {
/// <summary>
/// A console terminal helper to create nicer output and receive input from the user
/// This class is thread-safe :).
/// </summary>
public static partial class Terminal {
/// <summary>
/// Represents a Table to print in console.
/// </summary>
private static class Table {
/// <summary>
/// Gets or sets the color of the border.
/// </summary>
/// <value>
/// The color of the border.
/// </value>
private static ConsoleColor BorderColor { get; } = ConsoleColor.DarkGreen;
public static void Vertical() => ((Byte)179).Write(BorderColor);
public static void RightTee() => ((Byte)180).Write(BorderColor);
public static void TopRight() => ((Byte)191).Write(BorderColor);
public static void BottomLeft() => ((Byte)192).Write(BorderColor);
public static void BottomTee() => ((Byte)193).Write(BorderColor);
public static void TopTee() => ((Byte)194).Write(BorderColor);
public static void LeftTee() => ((Byte)195).Write(BorderColor);
public static void Horizontal(Int32 length) => ((Byte)196).Write(BorderColor, length);
public static void Tee() => ((Byte)197).Write(BorderColor);
public static void BottomRight() => ((Byte)217).Write(BorderColor);
public static void TopLeft() => ((Byte)218).Write(BorderColor);
}
}
}