private void Count_Click(object sender, RoutedEventArgs e) { Thanks th = new Thanks(tabelid); th.Show(); App.Current.Windows[0].Close(); this.Close(); }