/// <summary> /// Writes header. /// </summary> private static void WriteHeader() { Console.SetTile("Assistant d'installation de Pixelmon"); Console.WriteCenteredLine(@" __________.__ .__ \______ \__|__ ___ ____ | | _____ ____ ____ | ___/ \ \/ // __ \| | / \ / _ \ / \ | | | |> <\ ___/| |_| Y Y ( <_> ) | \ |____| |__/__/\_ \\___ >____/__|_| /\____/|___| / \/ \/ \/ \/ [ Installateur par Hawezo - https://github.com/hawezo ] "); }
public static void WriteCenteredLine(string text) { // Recursive if (text.Contains('\n')) { foreach (string line in text.Split('\n')) { ConsoleHelper.WriteCenteredLine(line); } } // Centers else { Console.SetCursorPosition((Console.WindowWidth - text.Length) / 2, Console.CursorTop); Console.WriteLine(text); } }