/// <summary> /// Vérifie les identifiants rentrés par l'utilisateur, si ils sont correct, la classe UserCourant est instancié et le fenêtre WindowAcc est ouverte /// </summary> /// <param name="obj"></param> private void OnLogin(object obj) { if (GestionBDD.verifLoginMdp(Identifiant, Password)) { WindowAccClosedEvent.GetInstance().Handler += OnCloseWindowAcceuil; UserCourant.SetNull(); GestionBDD.remplirUserCourant(Identifiant); _wAcceuil = new WindowAcc(); Identifiant = null; Password = null; _wAcceuil.ShowDialog(); } else { MessageBox.Show("Les informations transmises n'ont pas permis de vous authentifier", "Erreur d'identification", MessageBoxButton.OK, MessageBoxImage.Warning); } }
/// <summary> /// Déclenche un événement permettant de fermer la fenêtre principale /// </summary> /// <param name="obj"></param> private void OnQuit(object obj) { WindowAccClosedEvent.GetInstance().OnWindowAccClosedHandler(EventArgs.Empty); }
private void OnCloseWindowAcceuil(object sender, EventArgs e) { _wAcceuil.Close(); WindowAccClosedEvent.GetInstance().Handler -= OnCloseWindowAcceuil; }