public static void ShowSpacer(Spacer s) { for (int i = 0; i < s.NumChar; i++) { Console.Write(s.Char); } Console.WriteLine(); }
public void DisplayHeader(char aChar, string title) { Console.ForegroundColor = ConsoleColor.Green; this.NumChar = Console.WindowWidth; Spacer sp = new Spacer((char)22); string tagLine = ">>> ALL HAIL THE HYPNO TOAD! <<<"; sp.ShowSpacer(); Console.SetCursorPosition((Console.WindowWidth - title.Length) / 2, Console.CursorTop); Console.WriteLine(title); sp.ShowSpacer(); Console.ResetColor(); }
public void DisplayHeader(string title) { int width = Console.WindowWidth; Console.Title = title; Console.ForegroundColor = ConsoleColor.Green; Spacer sp = new Spacer((char)22, Console.WindowWidth); string tagLine = ">>> ALL HAIL THE HYPNO TOAD! <<<"; sp.ShowSpacer(); Console.SetCursorPosition((width - title.Length) / 2, Console.CursorTop); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(title); Console.ForegroundColor = ConsoleColor.Green; Console.SetCursorPosition((width - tagLine.Length) / 2, Console.CursorTop); Console.WriteLine(tagLine); sp.ShowSpacer(); Console.ResetColor(); }
public void FormatHeader() { int width = Console.WindowWidth; string title = Title; string tag = TagLine; char aChar = Symbol; Console.Clear(); Console.Title = this.Title; Console.ForegroundColor = ConsoleColor.Green; Spacer sp = new Spacer(aChar, Console.WindowWidth); sp.ShowSpacer(); Console.SetCursorPosition((width - title.Length) / 2, Console.CursorTop); Console.ForegroundColor = ConsoleColor.White; Console.WriteLine(title); Console.ForegroundColor = ConsoleColor.Green; Console.SetCursorPosition((width - tag.Length) / 2, Console.CursorTop); Console.WriteLine(TagLine); sp.ShowSpacer(); Console.ResetColor(); }