Событие Oncomplete не стреляли
I am new to Biometric Application. I am trying to write a biometric fingerprint capture form but I am stocked up and I don't have idea on how to go further from here. The following are my code I am trying out but I discovered that the Oncomplete event is not firing. please can anyone help me out on what is wrong with the code? Thanks
Что я уже пробовал:
Imports DPFP Imports DPFP.Capture Imports DPFP.Capture.ReadersCollection Public Class frmBioCaptures Implements EventHandler Private mReader As Capture Private mReaders As ReadersCollection Public Sub New() ' This call is required by the designer. InitializeComponent() ' Add any initialization after the InitializeComponent() call. End Sub Private Sub LoadReaders() mReaders = New ReadersCollection() Dim deviceFound As Boolean = mReaders.Count > 0 If deviceFound Then For Each rDevice In mReaders.Values cmbReaders.Items.Add(rDevice.ProductName) Next End If End Sub Private Sub frmBioCaptures_Load(sender As Object, e As EventArgs) Handles Me.Load LoadReaders() End Sub Private Sub cmbReaders_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cmbReaders.SelectedIndexChanged bntStartEnroll.Enabled = cmbReaders.SelectedIndex > -1 End Sub Private Sub bntStartEnroll_Click(sender As Object, e As EventArgs) Handles bntStartEnroll.Click Dim devID As String = mReaders(cmbReaders.SelectedIndex).SerialNumber mReader = New Capture(devID, Priority.Normal) mReader.EventHandler = Me mReader.StartCapture() End Sub Public Sub OnComplete(Capture As Object, ReaderSerialNumber As String, Sample As Sample) Implements EventHandler.OnComplete Process(Sample) End Sub Public Sub OnFingerGone(Capture As Object, ReaderSerialNumber As String) Implements EventHandler.OnFingerGone End Sub Public Sub OnFingerTouch(Capture As Object, ReaderSerialNumber As String) Implements EventHandler.OnFingerTouch End Sub Public Sub OnReaderConnect(Capture As Object, ReaderSerialNumber As String) Implements EventHandler.OnReaderConnect End Sub Public Sub OnReaderDisconnect(Capture As Object, ReaderSerialNumber As String) Implements EventHandler.OnReaderDisconnect End Sub Public Sub OnSampleQuality(Capture As Object, ReaderSerialNumber As String, CaptureFeedback As CaptureFeedback) Implements EventHandler.OnSampleQuality End Sub Protected Function ConvertSampleToBitmap(ByVal Sample As DPFP.Sample) As Bitmap Dim convertor As New DPFP.Capture.SampleConversion() ' Create a sample convertor. Dim bitmap As Bitmap = Nothing ' TODO: the size doesn't matter convertor.ConvertToPicture(Sample, bitmap) ' TODO: return bitmap as a result Return bitmap End Function Protected Function ExtractFeatures(ByVal Sample As DPFP.Sample, ByVal Purpose As DPFP.Processing.DataPurpose) As DPFP.FeatureSet Dim extractor As New DPFP.Processing.FeatureExtraction() ' Create a feature extractor Dim feedback As DPFP.Capture.CaptureFeedback = DPFP.Capture.CaptureFeedback.None Dim features As New DPFP.FeatureSet() extractor.CreateFeatureSet(Sample, Purpose, feedback, features) ' TODO: return features as a result? If (feedback = DPFP.Capture.CaptureFeedback.Good) Then Return features Else Return Nothing End If End Function Private Sub Process(ByVal sample As Sample) DrawPicture(ConvertSampleToBitmap(sample)) End Sub Private Sub DrawPicture(ByVal bmp) imgFinger.Image = New Bitmap(bmp, imgFinger.Size) End Sub End Class
[no name]
Я понятия не имею, что может сделать реализация вместо ручек.
Воспользуйся Private Sub whatever(something) Handles thing.OnComplete