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;
             }
         }
     }
 }
 public AddAdminUser()
 {
     InitializeComponent();
     fingerprintReader = new FingerprintReader();
     InitializeReader();
     initializeAllAdminFingerprintData();
 }