Advertisement
Guest User

Untitled

a guest
Dec 13th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. namespace SI4WpfLabo1
  2. {
  3. /// <summary>
  4. /// Logique d'interaction pour MainWindow.xaml
  5. /// </summary>
  6. public partial class MainWindow : MetroWindow
  7. {
  8. public MainWindow()
  9. {
  10. InitializeComponent();
  11. }
  12.  
  13. private void Window_Loaded(object sender, RoutedEventArgs e)
  14. {
  15.  
  16. }
  17.  
  18. private void BtnConnexion_Click(object sender, RoutedEventArgs e)
  19. {
  20. const string idlogin = "d.germann";
  21. const string mdplogin = "H4x0r";
  22.  
  23.  
  24.  
  25.  
  26.  
  27. if (TbxLogin.Text != idlogin || TbxPassword.Password != mdplogin)
  28. {
  29. MessageBox.Show("Mauvais ID/MDP");
  30. }
  31. else
  32. {
  33. DialogManager.ShowModalMessageExternal(this, "Connexion", "Bonjour " + TbxLogin.Text);
  34. Accueil A = new Accueil();
  35. A.Show();
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement