Programm wird nun beim schließen der Verbindung beendet
This commit is contained in:
@@ -10,11 +10,12 @@ public class Terminal
|
||||
private String InputBuffer = "";
|
||||
private bool AcceptInput = false;
|
||||
private int OutLinePos;
|
||||
private Thread catchInputThread;
|
||||
|
||||
public Terminal ()
|
||||
{
|
||||
OutLinePos = Console.CursorTop;
|
||||
Thread catchInputThread = new Thread (new ThreadStart (this.CatchInput));
|
||||
catchInputThread = new Thread (new ThreadStart (this.CatchInput));
|
||||
catchInputThread.Start ();
|
||||
}
|
||||
|
||||
@@ -91,5 +92,10 @@ public class Terminal
|
||||
Console.SetCursorPosition (0, OutLinePos);
|
||||
}
|
||||
}
|
||||
|
||||
public void Close ()
|
||||
{
|
||||
catchInputThread.Abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user