//退出程序 private static void ExitProgram() { servercontrol.StopListenThread(); viewcontrol.StopListenServerThread(); System.Environment.Exit(0); }