private void Enrollpage_On_Enroll(DPCtlXUru.EnrollmentXControl enrollmentControl, XFmdResult result, int fingerPosition)
        {
            // Helper.Fmds.Add(fingerPosition, result.Fmd.Fmd);//Helper.Source.Add(result.Fmd.Fmd.Bytes);
            var fmdxml = Fmd.SerializeXml(result.Fmd.Fmd);
            var main   = ResourcesBase.GetMainWindowViewModel();

            Pegawai.Enrollment = fmdxml;
            var res = main.PegawaiCollection.Updated(Pegawai);

            SendMessage(ActionMessage.SendMessage, "Enroll Complete");
        }
        private void Enrollpage_On_Captured(DPCtlXUru.EnrollmentXControl enrollmentControl, DPXUru.XCaptureResult captureResult, int fingerPosition)
        {
            if (enrollmentControl.Reader != null)
            {
                SendMessage(ActionMessage.SendMessage, "OnCaptured:  " + enrollmentControl.Reader.Description.Name + ", finger " + fingerPosition + ", quality " + captureResult.Quality.ToString());
            }
            else
            {
                SendMessage(ActionMessage.SendMessage, "OnCaptured:  No Reader Connected, finger " + fingerPosition);
            }

            if (captureResult.ResultCode != Constants.ResultCode.DP_SUCCESS.ToString())
            {
                if (Finger.CurrentReader != null)
                {
                    Finger.CurrentReader.Dispose();
                    Finger.CurrentReader = null;
                }

                // Disconnect reader from enrollment control
                enrollpage.Reader = null;

                MessageBox.Show("Error:  " + captureResult.ResultCode);
                //       btnCancel.Enabled = false;
            }
            else
            {
                if (captureResult.Fid.Fivs != null)
                {
                    foreach (XFid.XFiv fiv in captureResult.Fid.Fivs)
                    {
                        Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() =>
                        {
                            pbFingerprint.Source = ToBitmapImage(Finger.CreateBitmap(fiv.Fiv.RawImage, fiv.Fiv.Width, fiv.Fiv.Height));
                        }));
                    }
                }
            }
            SendMessage(ActionMessage.SendMessage, "Start");
        }
 private void Enrollpage_On_StartEnroll(DPCtlXUru.EnrollmentXControl enrollmentControl, string result, int fingerPosition)
 {
     SendMessage(ActionMessage.SendMessage, "Start e");
 }