void mRecognizer_OnScanningDone(IList<Microblink.IRecognitionResult> resultList, RecognitionType recognitionType)
{
// terminate direct API
Recognizer.GetSingletonInstance().Terminate();
// navigate to results page
bool resultFound = false;
if (recognitionType == RecognitionType.SUCCESSFUL) {
// Find croatian payslip results in list of results.
foreach (var result in resultList) {
if (result.Valid && !result.Empty) {
// check if result is a MRTD result
if (result.Valid && !result.Empty && result is Microblink.MRTDRecognitionResult) {
// obtain the MRTD result
Microblink.MRTDRecognitionResult mrtdResult = (Microblink.MRTDRecognitionResult)result;
// set it as input for results page
ResultsPage.results = mrtdResult.Elements;
// mark as found
resultFound = true;
break;
}
}
}
}
// send scan status to results page
ResultsPage.resultFound = resultFound;
// navigate to results page
NavigationService.Navigate(new Uri("/ResultsPage.xaml", UriKind.Relative));
// reenable photo choosing
ReenableButton();
}