private void NewFile(object sender, RoutedEventArgs e) { try { InitWindow iw = new InitWindow(); iw.Show(); while (process.HasExited == false) { process.Kill(); } //FreeConsole(); WpfServer.QuitServer(); this.Close(); } catch (Exception) { } }
private void Window_Closed(object sender, EventArgs e) { try { process.CloseMainWindow(); Thread.Sleep(1000); while (process.HasExited == false) { process.Kill(); } //FreeConsole(); WpfServer.QuitServer(); TcpFileServer.QuitServer(); } catch (Exception) { } }