mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Added procedure WaitForReturn in MVCFramework.Console.pas
This commit is contained in:
parent
32fd704d83
commit
87c712d640
@ -75,6 +75,7 @@ function GetConsoleSize: TMVCConsoleSize;
|
||||
function GetConsoleBufferSize: TMVCConsoleSize;
|
||||
procedure ClrScr;
|
||||
function GetCh: Char;
|
||||
procedure WaitForReturn;
|
||||
|
||||
function ColorName(const color: TConsoleColor): String;
|
||||
|
||||
@ -97,6 +98,11 @@ begin
|
||||
Result := GetEnumName(TypeInfo(TConsoleColor), Ord(color));
|
||||
end;
|
||||
|
||||
procedure WaitForReturn;
|
||||
begin
|
||||
while GetCh <> #13 do;
|
||||
end;
|
||||
|
||||
{$IFDEF LINUX}
|
||||
procedure Init; inline;
|
||||
begin
|
||||
|
@ -65,7 +65,8 @@ begin
|
||||
http://www.indyproject.org/docsite/html/frames.html?frmname=topic&frmfile=TIdCustomTCPServer_ListenQueue.html }
|
||||
LServer.ListenQueue := 200;
|
||||
Writeln('Press RETURN to stop the server');
|
||||
ReadLn;
|
||||
WaitForReturn;
|
||||
TextColor(Red);
|
||||
Writeln('Server stopped');
|
||||
ResetConsole();
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user