Esempio n. 1
0
        public void Button_Enter_Click(object sender, RoutedEventArgs e)
        {
            string login = textboxlogin.Text.Trim();
            string pass = passbox.Password.Trim();

            if (login.Length < 5)
            {
                textboxlogin.ToolTip = "это поле введено не корректно!";
                textboxlogin.Background = Brushes.LightBlue;
            }
            if (pass.Length < 5)
            {
                { passbox.ToolTip = "это поле введено не корректно!"; passbox.Background = Brushes.LightBlue; }
                return;
            }
            UserModel user = new UserModel { Login = login, Password = pass };
            if (!IsUserByPaswordFound(user))
            {
                { passbox.ToolTip = "логин или пароль введено не корректно!"; passbox.Background = Brushes.LightBlue; }
                return;
            }
            CurrentUser = user;
            TrackModels.Clear();
            autorizgrid.Children.Clear();
            autorizgrid.Children.Add(new HelloUser());
        }
Esempio n. 2
0
 private void button_Clear_Click(object sender, RoutedEventArgs e)
 {
     TrackModels.Clear();
     CurrentPlayListView.ItemsSource = TrackModels;
 }
Esempio n. 3
0
 private void button_Out_Click(object sender, RoutedEventArgs e)
 {
     CurrentUser = null;
     btnOut.Visibility = Visibility.Hidden;
     TrackModels.Clear();
 }