Authorization.xaml.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.Navigation;
  14. using System.Windows.Shapes;
  15. namespace ROGOZ.Pages
  16. {
  17. /// <summary>
  18. /// Логика взаимодействия для Authorization.xaml
  19. /// </summary>
  20. public partial class Authorization : Window
  21. {
  22. public Authorization()
  23. {
  24. InitializeComponent();
  25. }
  26. private void BtnLogin_Click(object sender, RoutedEventArgs e)
  27. {
  28. if (TBoxLogin.Text != "" && PBoxPassword.Password != "")
  29. {
  30. //MessageBox.Show("Заходи", "хихихи", MessageBoxButton.OK, MessageBoxImage.Asterisk);
  31. MainWindow mainWindow = new MainWindow();
  32. mainWindow.Show();
  33. this.Close();
  34. }
  35. else
  36. {
  37. MessageBox.Show("ДА.", "Капец", MessageBoxButton.OK, MessageBoxImage.Error);
  38. }
  39. }
  40. private void PBoxPassword_PasswordChanged(object sender, RoutedEventArgs e)
  41. {
  42. if (PBoxPassword.Password.Length > 0)
  43. {
  44. WaterMarkerLabel.Visibility = Visibility.Collapsed;
  45. }
  46. else
  47. {
  48. WaterMarkerLabel.Visibility = Visibility.Visible;
  49. }
  50. }
  51. private void Page_MouseDown(object sender, MouseButtonEventArgs e)
  52. {
  53. if (e.LeftButton == MouseButtonState.Pressed) { DragMove(); }
  54. }
  55. private void btnClose_Click(object sender, RoutedEventArgs e)
  56. {
  57. this.Close();
  58. }
  59. private void btnMinimize_Click(object sender, RoutedEventArgs e)
  60. {
  61. WindowState = WindowState.Minimized;
  62. }
  63. }
  64. }