private void grFingerXCtrl_ImageAcquired(object sender, AxGrFingerXLib._IGrFingerXCtrlEvents_ImageAcquiredEvent e)
        {
            System.Drawing.Image handle = null;
            IntPtr hdc = GetDC(System.IntPtr.Zero);

            grFingerXCtrl.CapRawImageToHandle(ref e.rawImage, e.width, e.height,
                                              hdc.ToInt32(), ref handle);
            //pbFingerprint.Image = handle; //put the just added image in our picture box
            //pbFingerprint.Update();

            //set the parameters in the FingerprintOPFormUSerMgt class
            fingerprintOP.rawImage.img    = e.rawImage;
            fingerprintOP.rawImage.height = (int)e.height;
            fingerprintOP.rawImage.width  = (int)e.width;
            fingerprintOP.rawImage.Res    = e.res;

            //finally , we extract the template and try to validate de user
            fingerprintOP.extractTemplate();
            //bool matched = fingerprintOP.authenticate(comboNames.SelectedItem.ToString(), ds);
            //authenticate();

            if (action.Equals("timeAttendance"))
            {
                timeAttendanceData.onImageAcquired(handle, e.rawImage, (int)e.height, (int)e.width, e.res);//do the action related to the FormUserMgt
            }
            else
            {
                studentList.onImageAcquired(handle, e.rawImage, (int)e.height, (int)e.width, e.res);//do the action related to the FormUserMgt
            }
        }
示例#2
0
        public void onImageAcquired(Image handle, object rawImage, int height, int width, int res)
        {
            //set the parameters in the FingerprintOPFormUSerMgt class
            fingerprintOP.rawImage.img    = rawImage;
            fingerprintOP.rawImage.height = height;
            fingerprintOP.rawImage.width  = width;
            fingerprintOP.rawImage.Res    = res;

            //finally , we extract the template and try to validate de user
            fingerprintOP.extractTemplate();

            if (optIdentificationMode.Checked)
            {
                identify();
            }
            else if (optVerificationMode.Checked)
            {
                new OpenForms().openModalForm(new IDInputForm(this));
            }
        }
        public void onImageAcquired(Image handle, object rawImage, int height, int width, int res)
        {
            if (action.Equals("ENROLL"))
            {
                biometric.onImageAcquired(handle, rawImage, height, width, res);
            }
            else
            {
                if (!this.isOpen)
                {
                    //set the parameters in the FingerprintOPFormUSerMgt class
                    fingerprintOP.rawImage.img    = rawImage;
                    fingerprintOP.rawImage.height = height;
                    fingerprintOP.rawImage.width  = width;
                    fingerprintOP.rawImage.Res    = res;

                    //finally , we extract the template and try to validate de user
                    fingerprintOP.extractTemplate();

                    identify();
                }
            }
        }