diff --git a/dummyclient_manuel/Program.cs b/dummyclient_manuel/Program.cs index 0e61037..4989c69 100644 --- a/dummyclient_manuel/Program.cs +++ b/dummyclient_manuel/Program.cs @@ -39,6 +39,7 @@ public class Program Term.PrintLine(line); } SenderThread.Abort(); + Term.Close(); } public void doSend () diff --git a/dummyclient_manuel/Terminal.cs b/dummyclient_manuel/Terminal.cs index ed82013..5846f1c 100644 --- a/dummyclient_manuel/Terminal.cs +++ b/dummyclient_manuel/Terminal.cs @@ -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(); + } }