private void MainWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { tc.shutdown2(true); Application.Current.Shutdown(); }