Dim WithEvents op As FPRegisterTemplate
Dim cursample As Integer
Dim register As FPTemplate
Private Sub Save_and_Load_Verify_Form()
Dim bvariant As Variant
blob_write = Null
bvariant = Null
If register Is Nothing Then
lblEvents.Caption = ""
MsgBox "Nada registrado !!"
Exit Sub
End If
register.Export bvariant
blob_write = bvariant
rs.AddNew
rs("cuenta") = eCuenta.Text
If cCliente.Text = "Titular" Then
rs("cliente") = 1
End If
If cCliente.Text = "Autorizado 1" Then
rs("cliente") = 2
End If
If cCliente.Text = "Autorizado 2" Then
rs("cliente") = 3
End If
If cCliente.Text = "Autorizado 3" Then
rs("cliente") = 4
End If
If cDedo.Text = "pulgar derecho" Then
rs("dedo") = 1
End If
If cDedo.Text = "indice derecho" Then
rs("dedo") = 2
End If
If cDedo.Text = "medio derecho" Then
rs("dedo") = 3
End If
If cDedo.Text = "anular derecho" Then
rs("dedo") = 4
End If
If cDedo.Text = "meñique derecho" Then
rs("dedo") = 5
End If
If cDedo.Text = "pulgar izquierdo" Then
rs("dedo") = 6
End If
If cDedo.Text = "indice izquierdo" Then
rs("dedo") = 7
End If
If cDedo.Text = "medio izquierdo" Then
rs("dedo") = 8
End If
If cDedo.Text = "anular izquierdo" Then
rs("dedo") = 9
End If
If cDedo.Text = "meñique izquierdo" Then
rs("dedo") = 10
End If
rs("fp") = blob_write
rs.Update
reslt = MsgBox("Desea capturar otra huella ! ? ", vbYesNo, "Otra Huella ?")
If reslt = 6 Then
Call start_cmd_Click
Else
Load frmVerify
End If
End Sub
Private Sub Command1_Click()
Load frmVerify
End Sub
Private Sub Command2_Click()
End Sub
Private Sub Form_Load()
If cnx Is Nothing And rs Is Nothing Then
Set cnx = New Connection
Set rs = New Recordset
End If
cnx.Open "CML", "usounds", "madljda"
rs.Open "select * from cre_fp order by cuenta, cliente", cnx, adOpenKeyset, adLockOptimistic
cursample = 0
Set op = New FPRegisterTemplate
For i = 0 To 3
picSample(i).Picture = Nothing
Label6(i).Visible = False
Next i
End Sub
Private Sub op_Done(ByVal pTemplate As Object)
lblEvents.Caption = ""
Set register = Nothing
Set register = pTemplate
MsgBox "Proceso de Registro Listo !. Enseguida el sistema grabara los datos"
Call Save_and_Load_Verify_Form
End Sub
Private Sub op_SampleQuality(ByVal Quality As DpSdkEngLib.AISampleQuality)
Select Case Quality
Case AISampleQuality.Sq_Good
lblQuality.Caption = "OK"
cursample = cursample + 1
Label6(cursample - 1).Visible = False
If cursample <> 4 Then
Label6(cursample).Visible = True
End If
Case AISampleQuality.Sq_LowContrast
lblQuality.Caption = ""
Case AISampleQuality.Sq_NoCentralRegion
lblQuality.Caption = ""
Case AISampleQuality.Sq_None
lblQuality.Caption = ""
Case AISampleQuality.Sq_NotEnoughFtr
lblQuality.Caption = "" '
Case AISampleQuality.Sq_TooDark
lblQuality.Caption = ""
Case AISampleQuality.Sq_TooLight
lblQuality.Caption = ""
Case AISampleQuality.Sq_TooNoisy
lblQuality.Caption = ""
End Select
lblEvents.Caption = ""
End Sub
Private Sub op_SampleReady(ByVal pSample As Object)
If cursample < 3 Then
Label3.Caption = "Si, Ponga su dedo en el Lector para Capturar Huella #" & Str(cursample + 1)
Label3.Refresh
Label8.Caption = ""
Label8.Refresh
Else
Me.MousePointer = 2
End If
pSample.PictureOrientation = Or_Portrait
pSample.PictureWidth = picSample(cursample).Width / Screen.TwipsPerPixelX
pSample.PictureHeight = picSample(cursample).Height / Screen.TwipsPerPixelY
picSample(cursample).Picture = pSample.Picture
lblEvents.Caption = "Captura Lista !"
End Sub
Private Sub picSample_Click(Index As Integer)
Dim i As Integer
cursample = 0
For i = 0 To 3
picSample(i).Picture = Nothing
Label6(i).Visible = False
Next i
Label6(cursample).Visible = True
Set op = Nothing
Set op = New FPRegisterTemplate
op.Run
lblQuality.Caption = ""
lblEvents.Caption = ""
End Sub
Private Sub start_cmd_Click()
eCuenta.Refresh
If eCuenta.Text = "" Then
MsgBox "Por favor capture primero # Cuenta, Cliente y Dedo"
Exit Sub
End If
picSample_Click (0)
End Sub