Esempio n. 1
0
 private void Border_PointerEntered(object sender, PointerRoutedEventArgs e)
 {
     if (count < 4)
     {
         var s = (Border)sender;
         var v = s.DataContext;
         password += v.ToString();
         if (count == 0)
         {
             PasswordStars.Text = "*";
         }
         else
         {
             PasswordStars.Text += star;
         }
         if (count == 3)
         {
             var           db = new AppDbContext();
             MessageDialog d;
             if (db.CheckPassword(password))
             {
                 d = new MessageDialog("True");
                 HideLockScreen.Begin();
                 App.Authorized = true;
                 Frame.Navigate(typeof(HomePage));
             }
             else
             {
                 d = new MessageDialog("False");
                 d.ShowAsync();
             }
             count                   = 0;
             password                = "";
             PasswordStars.Text      = "";
             homeButton.IsTapEnabled = true;
             return;
         }
         count++;
     }
 }
Esempio n. 2
0
 private void backButton_Click(object sender, TappedRoutedEventArgs e)
 {
     HideLockScreen.Begin();
     homeButton.IsTapEnabled = true;
     backButton.IsTapEnabled = false;
 }