123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- using System;
- using System.Collections.Generic;
- using System.Collections.Specialized;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Shapes;
- namespace InteractiveKiosk
- {
- /// <summary>
- /// Interaction logic for AuthorizationWindow.xaml
- /// </summary>
- public partial class AuthorizationWindow : Window
- {
- InteractiveKioskEntities db = new InteractiveKioskEntities();
- public AuthorizationWindow()
- {
- InitializeComponent();
- }
- private void LoginButton(object sender, RoutedEventArgs e)
- {
- //if (username.Text == "" || password.Text == "")
- //{
- // MessageBox.Show("Введено неверное значение!");
- // return;
- //}
- //if (db.ParkManagers.Select(item => item.Username + " " + item.Password).Contains(username.Text + " " + password.Text))
- //{
- // MessageBox.Show("Добро пожаловать, вы авторизированы");
- // this.Close();
- //}
- //else
- //{
- // MessageBox.Show("Введено неверное значение логина/пароля");
- //}
- }
- private void MinButton_MouseDown(object sender, MouseButtonEventArgs e)
- {
- this.WindowState = WindowState.Minimized;
- }
- private void ExitButton_MouseDown(object sender, MouseButtonEventArgs e)
- {
- this.Close();
- }
- private void Authorization_MouseDown(object sender, MouseButtonEventArgs e)
- {
- if (e.ChangedButton == MouseButton.Left)
- {
- this.DragMove();
- }
- }
- private void OnPasswordChanged(object sender, RoutedEventArgs e)
- {
- if(Password.Password.Length > 0)
- {
- Watermark.Visibility = Visibility.Collapsed;
- }
- else
- {
- Watermark.Visibility = Visibility.Visible;
- }
- }
- private void PasswordChecked(object sender, RoutedEventArgs e)
- {
- if (Password.Password.Length > 0)
- {
- Password.Visibility = Visibility.Visible;
- }
-
- }
- }
- }
|