Auth.xaml.cs 848 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Controls;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Shapes;
  14. namespace examPrepare.Windows
  15. {
  16. /// <summary>
  17. /// Interaction logic for Auth.xaml
  18. /// </summary>
  19. public partial class Auth : Window
  20. {
  21. public Auth()
  22. {
  23. InitializeComponent();
  24. }
  25. private void Button_Click(object sender, RoutedEventArgs e)
  26. {
  27. string nick = login.Text;
  28. string pass = password.Text;
  29. if (nick == "ilya" && pass == "123")
  30. {
  31. this.DialogResult = true;
  32. return;
  33. }
  34. this.DialogResult = false;
  35. }
  36. }
  37. }