private static void StopThread() { if (ReplayThread != null) { RequestStop = true; Thread.Sleep(200); if (ReplayThread.IsAlive == true) { Cleanup(); ReplayThread.Abort(); } } }