private void VerifyUser(object sender, RoutedEventArgs e) { if ((K == null || K < 0) && DistanceMethod != KDDistanceMethod.Mahalanobis) { MessageBox.Show("Proszę wybrać parametr K"); return; } var window = new KeystrokeDynamicsReadingWindow(); window.ShowDialog(); if (window.DialogResult != true) { return; } var reading = window.Reading; string userName = reading.EvaluateUserName(Readings.ToArray(), DistanceMethod, K.Value); if (userName == window.UserName) { MessageBox.Show("Pomyślnie zweryfikowano użytkownika", "Uzyskano wynik!"); } else { MessageBox.Show("Wynik weryfikacji jest negatywny", "Uzyskano wynik"); } }
private void OpenKDReadingWindow(object sender, RoutedEventArgs e) { var window = new KeystrokeDynamicsReadingWindow(); window.ShowDialog(); if (window.DialogResult != true) { return; } Readings.Add(window.Reading); }
private void RecognizeUser(object sender, RoutedEventArgs e) { if ((K == null || K < 0) && DistanceMethod != KDDistanceMethod.Mahalanobis) { MessageBox.Show("Proszę wybrać parametr K"); return; } var window = new KeystrokeDynamicsReadingWindow { NameTextBoxVisibility = Visibility.Collapsed }; window.ShowDialog(); if (window.DialogResult != true) { return; } var reading = window.Reading; string userName = reading.EvaluateUserName(Readings.ToArray(), DistanceMethod, K); MessageBox.Show($"Rozpoznany użytkownik to {userName}", "Uzyskano wynik!"); }