예제 #1
0
 /// <summary>
 /// Initialize the finger print library as wel as the underlying Griaule core library
 /// </summary>
 /// <param name="dal">Data access layer interface to interact with underlying data store, User responsible to manage opening and disposing object</param>
 public void Initialize(IFPDal dal)
 {
     DataAccessLayer = dal;
     if (!closed)
     {
         throw new FPLibraryException(FPLibraryException.LibraryInitialisationError, "Library has already been initialized.");
     }
     griauleLibrary           = new FingerprintCore();
     griauleLibrary.onStatus += new StatusEventHandler(griauleLibrary_onStatus);
     //griauleLibrary.onFinger - not yet linked - only once we want to be notified
     //griauleLibrary.onImage - not yet linked - only once we want to be notified
     try
     {
         griauleLibrary.Initialize();
         griauleLibrary.CaptureInitialize();
         griauleLibrary.SetIdentifyParameters(IdentificationThreshold, IdentificationRotationTolerance);
         griauleLibrary.SetVerifyParameters(VerificationThreshold, VerificationRotationTolerance);
         closed = false;
     }
     catch (FingerprintException ex)
     {
         MessageBox.Show(String.Format("Initialize Error : {0} {1}", ex.ErrorCode, ex.Message), "FPLibrary Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (Exception e)
     {
         MessageBox.Show(String.Format("Initialize Error : {0}", e.Message), "FPLibrary Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
예제 #2
0
 /// <summary>
 /// Initialize the finger print library as wel as the underlying Griaule core library
 /// </summary>
 /// <param name="dal">Data access layer interface to interact with underlying data store, User responsible to manage opening and disposing object</param>
 public void Initialize(IFPDal dal)
 {
     DataAccessLayer = dal;
       if (!closed)
       {
     throw new FPLibraryException(FPLibraryException.LibraryInitialisationError, "Library has already been initialized.");
       }
       griauleLibrary = new FingerprintCore();
       griauleLibrary.onStatus += new StatusEventHandler(griauleLibrary_onStatus);
       //griauleLibrary.onFinger - not yet linked - only once we want to be notified
       //griauleLibrary.onImage - not yet linked - only once we want to be notified
       try
       {
     griauleLibrary.Initialize();
     griauleLibrary.CaptureInitialize();
     griauleLibrary.SetIdentifyParameters(IdentificationThreshold, IdentificationRotationTolerance);
     griauleLibrary.SetVerifyParameters(VerificationThreshold, VerificationRotationTolerance);
     closed = false;
       }
       catch (FingerprintException ex)
       {
     MessageBox.Show(String.Format("Initialize Error : {0} {1}", ex.ErrorCode, ex.Message), "FPLibrary Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
       }
       catch (Exception e)
       {
     MessageBox.Show(String.Format("Initialize Error : {0}", e.Message), "FPLibrary Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
       }
 }