コード例 #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            Votacion Votacion = new Votacion();

            this.Hide();
            Votacion.ShowDialog();
            this.Show();
        }
コード例 #2
0
        protected void Process(DPFP.Sample Sample)
        {
            DrawPicture(ConvertSampleToBitmap(Sample));

            // Process the sample and create a feature set for the enrollment purpose.
            DPFP.FeatureSet features = ExtractFeatures(Sample, DPFP.Processing.DataPurpose.Verification);

            // Check quality of the sample and start verification if it's good
            // TODO: move to a separate task
            if (features != null)
            {
                // Compare the feature set with our template
                DPFP.Verification.Verification.Result result = new DPFP.Verification.Verification.Result();
                Stream stream;

                DataTable      dt             = new DataTable();
                HuellaDactilar huellaDactilar = new HuellaDactilar();
                dt = PreparandoAcceso.BuscaHuellas(huellaDactilar.conex);

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    string huella     = dt.Rows[i][1].ToString();
                    byte[] byteHuella = dt.Rows[i][1] as byte[];
                    stream   = new MemoryStream(byteHuella);
                    Template = new DPFP.Template(stream);

                    Verificator.Verify(features, Template, ref result);
                    UpdateStatus(result.FARAchieved);
                    if (result.Verified)
                    {
                        MakeReport($"Huella Aceptada de {dt.Rows[i][0]}");
                        Votacion Votacion = new Votacion();

                        MessageBox.Show(new Form()
                        {
                            TopMost = true
                        }, $"Huella Aceptada de { dt.Rows[i][0]}");
                        Votacion.ShowDialog();

                        break;
                    }
                }
            }
        }