コード例 #1
0
ファイル: TestCapture.cs プロジェクト: ssickles/archive
 private void OnTemplateCaptured(TemplateCapturedEventArgs e)
 {
     EventHandler<TemplateCapturedEventArgs> obj = TemplateCaptured;
     if (obj != null)
     {
         obj(this, e);
     }
 }
コード例 #2
0
ファイル: CaptureSession.cs プロジェクト: ssickles/archive
 private void bsp_TemplateCaptured(object sender, TemplateCapturedEventArgs e)
 {
     lock (_locker)
     {
         if (!_finished)
         {
             switch (e.Status)
             {
                 case TemplateCapturedStatus.ExtractorException:
                     OnImageCaptured(new ImageCapturedEventArgs(ImageCapturedStatus.ExtractorException));
                     break;
                 case TemplateCapturedStatus.MinutiaCountFailed:
                     OnImageCaptured(new ImageCapturedEventArgs(ImageCapturedStatus.MinutiaCountFailed));
                     break;
                 case TemplateCapturedStatus.QualityCheckFailed:
                     OnImageCaptured(new ImageCapturedEventArgs(ImageCapturedStatus.QualityCheckFailed));
                     break;
                 case TemplateCapturedStatus.Success:
                     if (e.Template.MinutiaCount < Settings.Default.MinimumMinutiaCount)
                     {
                         OnImageCaptured(new ImageCapturedEventArgs(ImageCapturedStatus.MinutiaCountFailed));
                     }
                     else
                     {
                         OnImageCaptured(new ImageCapturedEventArgs(ImageCapturedStatus.Success));
                         _capturedSamples.Add(e.Template);
                         if (_capturedSamples.Count == _numSamples)
                         {
                             _finished = true;
                             _captureReset.Set();
                         }
                     }
                     break;
             }
         }
     }
 }