private void InitializeReader()
 {
     fingerprintReader = new FingerprintReader();
     if (!fingerprintReader.GenerateReader())
     {
         ShowError("Fingerprint Device Error", "Error while detecting the fingerprint device. Please Make sure that the device is connected to the computer. Thank you.");
     }
     else
     {
         if (!fingerprintReader.OpenReader())
         {
             ErrorHeader1.Text     = "Fingerprint device error";
             ErrorContent1.Text    = "Error while opening the fingerprint device.";
             DialogMessage1.IsOpen = true;
         }
         else
         {
             if (!fingerprintReader.StartCaptureAsync(this.OnCaptured))
             {
                 ErrorHeader1.Text     = "Fingerprint device error";
                 ErrorContent1.Text    = "Error while capturing the fingerprint.";
                 DialogMessage1.IsOpen = true;
             }
         }
     }
 }
示例#2
0
 private void InitializeReader()
 {
     if (!fingerprint.GenerateReader())
     {
         MessageBox.Show("Error while detecting the fingerprint device\nPlease try again later.", "Error Fingerprint", MessageBoxButton.OK, MessageBoxImage.Error);
         this.Close();
     }
     else
     {
         if (!fingerprint.OpenReader())
         {
             MessageBox.Show("Error while opening the fingerprint device.\nPlease try again later.", "Error Fingerprint", MessageBoxButton.OK, MessageBoxImage.Error);
             this.Close();
         }
         else
         {
             if (!fingerprint.StartCaptureAsync(this.OnCaptured))
             {
                 this.Close();
             }
         }
     }
 }