public void RegistrationAccept() { if (pass == passRepeat) { WaitingWindow w = new WaitingWindow(); w.Show(); //как сделать? this.IsEnabled = false; Gamer.ConnectToDatabase(); Gamer g = new Gamer(login, pass); if (g.login == (Gamer.FindByField("login", login)).login) { lblIsUsed.Visibility = System.Windows.Visibility.Visible; w.Close(); this.IsEnabled = true; } else { lblIsUsed.Visibility = System.Windows.Visibility.Hidden; g.Save(); Gamer.Disconnect(); w.Close(); this.IsEnabled = true; this.Close(); } } }