private void Field_TextChanged(object sender, RoutedEventArgs e) { if (_passcodeService.IsSimple && Field.Password.Length == 4) { if (_passcodeService.TryUnlock(Field.Password)) { Unlock(); } else { Lock(); } } }
private void ContentDialog_PrimaryButtonClick(ContentDialog sender, ContentDialogButtonClickEventArgs args) { if (_passcodeService.TryUnlock(Field.Password)) { Unlock(); } else { Lock(); args.Cancel = true; } }