mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Fix edge-case issues with Help functionality; modernize features
This commit is contained in:
@@ -56,7 +56,7 @@ namespace SabreTools.Core
|
||||
public static void SetConsoleHeader(string program)
|
||||
{
|
||||
// Dynamically create the header string, adapted from http://stackoverflow.com/questions/8200661/how-to-align-string-in-fixed-length-string
|
||||
int width = Console.WindowWidth - 3;
|
||||
int width = (Console.WindowWidth == 0 ? 80 : Console.WindowWidth) - 3;
|
||||
string border = $"+{new string('-', width)}+";
|
||||
string mid = $"{program} {Globals.Version}";
|
||||
mid = $"|{mid.PadLeft(((width - mid.Length) / 2) + mid.Length).PadRight(width)}|";
|
||||
|
||||
Reference in New Issue
Block a user