void btnConnection_Click(object sender, RoutedEventArgs e) { JediTournamentManager manag = new JediTournamentManager(); if (manag.CheckConnexionUser(txtLogin.Text.ToLower(), txtPassword.Password)) { MainWindow win = new MainWindow(); win.Show(); this.Close(); } }
/// <summary> /// Appelé lors du clic sur le bouton connexion. /// </summary> /// <param name="sender">Objet envoyant l'évènement.</param> /// <param name="e">Arguments</param> private void connexionButton_Click(object sender, RoutedEventArgs e) { // Vérifie le mot de passe entré if (m_manager.checkConnexionUser(loginForm.Text, passwdForm.Password)) { MainWindow win = new MainWindow(); win.Show(); this.Close(); } // Fail identification else { MessageBox.Show("Identification incorrecte", Assembly.GetExecutingAssembly().GetName().Name, MessageBoxButton.OK, MessageBoxImage.Error); } }
void btnConnection_Click(object sender, RoutedEventArgs e) { JediTournamentManager manag = new JediTournamentManager(); if (!txtLogin.Text.Equals("") && !txtPassword.Password.Equals("")) { if (JediTournamentManager.CheckConnexionUser(txtLogin.Text.ToLower(), txtPassword.Password)) { MainWindow win = new MainWindow(); win.Show(); this.Close(); } else { MessageBox.Show("Mot de passe ou login incorrect"); } } else { MessageBox.Show("Login ou mot de passe vide !"); } }
private void Gestion_Click(object sender, RoutedEventArgs e) { MainWindow main = new MainWindow(); main.Show(); this.Close(); }