don't wait for keypress after ctrl-x

This commit is contained in:
Edward Wright 2019-06-05 00:10:08 -04:00
parent db08444c54
commit b9841375c9

View File

@ -84,8 +84,8 @@ namespace SimplySerial
// exit the program if CTRL-X was pressed // exit the program if CTRL-X was pressed
if ((keyInfo.Key == ConsoleKey.X) && (keyInfo.Modifiers == ConsoleModifiers.Control)) if ((keyInfo.Key == ConsoleKey.X) && (keyInfo.Modifiers == ConsoleModifiers.Control))
{ {
serialPort.Close(); Output("\nSession terminated by user via CTRL-X.");
ExitProgram("\nSession terminated by user via CTRL-X.", exitCode: 0); ExitProgram(silent: true);
} }
// properly process the backspace character // properly process the backspace character
@ -168,7 +168,7 @@ namespace SimplySerial
} }
else else
{ {
Console.WriteLine("No COM ports detected.\n"); Console.WriteLine("\nNo COM ports detected.\n");
} }
ExitProgram(silent: true); ExitProgram(silent: true);