verificationform.cs

来自「DigitalPersona.rar」· CS 代码 · 共 47 行

CS
47
字号
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace UI_Support
{
    public partial class VerificationForm : Form
    {
        public VerificationForm(AppData data)
        {
            InitializeComponent();
			Data = data;
			Data.OnChange += delegate { ExchangeData(false); };		// Handle data changes to keep sync
		}

        private void ExchangeData(bool read)
        {
        }

		public void OnComplete(object Control, DPFP.FeatureSet FeatureSet, ref DPFP.Gui.EventHandlerStatus Status)
        {
			DPFP.Verification.Verification ver = new DPFP.Verification.Verification();
			DPFP.Verification.Verification.Result res = new DPFP.Verification.Verification.Result();
			// Compare feature set with all stored templates.
            foreach (DPFP.Template template in Data.Templates) {
                // Get template from storage.
                if (template != null) {
                    // Compare feature set with particular template.
					ver.Verify(FeatureSet, template, ref res);
                    Data.IsFeatureSetMatched = res.Verified;
                    Data.FalseAcceptRate = res.FARAchieved;
                    if (res.Verified)
                        break; // success
                }
            }
			if (!res.Verified)
				Status = DPFP.Gui.EventHandlerStatus.Failure;
			Data.Update();
        }

		private AppData Data;	// Reference to the application data object
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?