示例#1
0
        private async void Aceptar_Click(object sender, RoutedEventArgs e)
        {
            Loading.Visibility = Visibility.Visible;

            key = await log.AccessAsync(usr.Text, pass.Password);

            if (key != 0)
            {
                Xceed.Wpf.Toolkit.MessageBox.Show("Bienvenido de nuevo, accesando a su panel", "¡Buen dia!", MessageBoxButton.OK,
                                                  MessageBoxImage.None);
                this.Hide();
                ControlWindow control = new ControlWindow();
                control.Show(key);
                this.Close();
                Loading.Visibility = Visibility.Collapsed;
            }
            else
            {
                Xceed.Wpf.Toolkit.MessageBox.Show("Usuario o contraseña incorrectos, rectificalos", "Alto ahi", MessageBoxButton.OK,
                                                  MessageBoxImage.Stop);
                Loading.Visibility = Visibility.Collapsed;
            }
        }