Compare commits

..

No commits in common. "c6bd342e875a7b182b112c6d741bce7970e9f828" and "3fe43b6e63bff938cf7975f35361a9fececca62f" have entirely different histories.

View File

@ -46,15 +46,15 @@ public static class Setup
switch (pressedKey) switch (pressedKey)
{ {
case ConsoleKey.D1: case ConsoleKey.D1:
string[] levels = Enum.GetNames<LogLevel>();
int selected;
do
{
Console.Clear();
Console.WriteLine("New LogLevel:"); Console.WriteLine("New LogLevel:");
string[] levels = Enum.GetNames<LogLevel>();
for(int i = 0; i < levels.Length; i++) for(int i = 0; i < levels.Length; i++)
Console.WriteLine($"{i}) {levels[i]}"); Console.WriteLine($"{i}) {levels[i]}");
} while (!int.TryParse(Console.ReadKey().KeyChar.ToString(), out selected) || selected < 0 || selected >= levels.Length); int selected;
while (!int.TryParse(Console.ReadKey().KeyChar.ToString(), out selected) || selected < 0 ||
selected >= levels.Length)
{//NYAA
}
Console.WriteLine();//NewLine after Input Console.WriteLine();//NewLine after Input
c.LogLevel = Enum.Parse<LogLevel>(levels[selected]); c.LogLevel = Enum.Parse<LogLevel>(levels[selected]);
break; break;