Example #1
0
        public override Tuple <EnrollmentViewModel, MatchingViewModel> GetSettings()
        {
            try
            {
                if (!this.IsProcessorReady)
                {
                    this.ResultLogs.Add(LogSingleton.Instance.LicensesUnavailable);
                    return(null);
                }

                EnrollmentViewModel enrollmentViewModel = new EnrollmentViewModel
                {
                    InnerBoundaryRadiusFrom = Convert.ToByte(this.biometricClient.GetProperty("Irises.InnerBoundaryFrom")),
                    InnerBoundaryRadiusTo   = Convert.ToByte(this.biometricClient.GetProperty("Irises.InnerBoundaryTo")),
                    OuterBoundaryRadiusFrom = Convert.ToByte(this.biometricClient.GetProperty("Irises.OuterBoundaryFrom")),
                    OuterBoundaryRadiusTo   = Convert.ToByte(this.biometricClient.GetProperty("Irises.OuterBoundaryTo")),
                    QualityThreshold        = this.biometricClient.IrisesQualityThreshold
                };

                MatchingViewModel matchingViewModel = new MatchingViewModel();
                matchingViewModel.SelectedFAR            = matchingViewModel.FAR.FirstOrDefault(x => x.Key == this.MatchingThresholdToFAR(this.biometricClient.MatchingThreshold) * 100);
                matchingViewModel.MaximalRotation        = (int)this.biometricClient.IrisesMaximalRotation;
                matchingViewModel.SelectedMatchingSpeed  = matchingViewModel.MatchingSpeed.FirstOrDefault(x => x.Equals(this.biometricClient.IrisesMatchingSpeed.ToString(), StringComparison.Ordinal));
                matchingViewModel.MaximalResultCount     = this.biometricClient.MatchingMaximalResultCount;
                matchingViewModel.IsFirstReadOnlyChecked = this.biometricClient.MatchingFirstResultOnly;

                return(new Tuple <EnrollmentViewModel, MatchingViewModel>(enrollmentViewModel, matchingViewModel));
            }
            catch (Exception)
            {
                this.ResultLogs.Add(LogSingleton.Instance.SettingsRestored);
                return(null);
            }
        }
        public ActionResult Index()
        {
            //getting logged in userID and insuring some one is logged in
            if (Session["UserName"] == null)
            {
                return(RedirectToAction("", ""));
            }
            int userID = Int32.Parse(Session["UserName"].ToString());

            MatchingViewModel viewModel = new MatchingViewModel();

            viewModel.getMatches(userID);
            return(View(viewModel));
        }