Beispiel #1
0
 /// <summary>
 /// Evènement lorsque l'utilisateur click sur le bouton d'Administration.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Click_1(object sender, RoutedEventArgs e)
 {
     if (monBouton.Content.Equals("Administration"))
     {
         UserControlBottomManager.ShowUC(0);
         monBouton.Content = "Déconnexion";
     }
     else
     {
         DataManager.Deconnexion();
         UserControlBottomManager.ShowUC(1);
         monBouton.Content = "Administration";
     }
 }
 /// <summary>
 /// Evènement lorsque l'on clique sur le bouton "Valider"
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Accept(object sender, RoutedEventArgs e)
 {
     if (DataManager.Connexion(textBoxId.Text, passwordBox.Password))
     {
         if (DataManager.ConnexionAdmin())
         {
             UserControlBottomManager.ShowUC(2);
         }
         else
         {
             textBlockAttenteUtilisateur.Visibility = Visibility.Visible;
         }
     }
     else
     {
         passwordBox.Clear();
         textBlockMauvaisPass.Visibility = Visibility.Visible;
     }
 }
 /// <summary>
 /// Evènement lorsque l'on clique sur le bouton "Annuler".
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Cancel(object sender, RoutedEventArgs e)
 {
     DataManager.Deconnexion();
     UserControlBottomManager.ShowUC(1);
     (App.Current.MainWindow as MainWindow).monBouton.Content = "Administration";
 }