private void setup_fingerPrint()
        {
            try
            {
                myReader = new FastCodeSDK.FPReader();
                myReader.GetReaders();
                if (myReader.ReaderCount <= 0)
                {
                    throw new Exception("Fingerprint device not found");
                }

                if (myReader.ReaderCount > 0)
                {
                    list_event();
                    fingerPrint_Device.get_FileCode();
                    myReader.SelectReader(fingerPrint_Device.VerificationCode, fingerPrint_Device.SerialNumber, fingerPrint_Device.ActivationCode.Trim(), FPReader.ReaderPriority.Low);
                }
                else
                {
                    MessageBox.Show("Fingerprint reader device not found", "Axioma Agent", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    this.Close();
                }

                string TemplateSafetyKey = fingerPrint_Device.TemplateSafetyKey;
                //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(this,typeof(form_Wait),true,true,false);
                foreach (DataRow row in dt_finger_employees.Rows)
                {
                    int finger = Convert.ToInt32(row["fingerID"]);                   //get fingerindexes
                    FPReader.FingerIndex fingerIndex = (FPReader.FingerIndex)finger; //convert fingerindex
                    string employeeID     = row["employee"].ToString();
                    string fingerTemplate = row["fingerprint"].ToString();           //template
                    myReader.FPLoad(employeeID, fingerIndex, fingerTemplate, TemplateSafetyKey);
                }
                myReader.FPIdentificationID     += new FPReader.FPIdentificationIDEventHandler(MyReader_FPIdentificationID);
                myReader.FPIdentificationStatus += new FPReader.FPIdentificationStatusEventHandler(MyReader_FPIdentificationStatus);
                myReader.FPIdentificationStart(5);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            timer2.Start();
        }
        private void PT_fingerMultiEnd_Alt_Shown(object sender, EventArgs e)
        {
            try
            {
                string TemplateSafetyKey = fingerPrint_Device.TemplateSafetyKey;
                DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(typeof(form_Wait));

                foreach (DataRow row in _dt_ins_fingerPrint.Rows)
                {
                    int finger = Convert.ToInt32(row["fingerID"]);                   //get fingerindexes
                    FPReader.FingerIndex fingerIndex = (FPReader.FingerIndex)finger; //convert fingerindex
                    string employeeID     = row["employee"].ToString();
                    string fingerTemplate = row["fingerprint"].ToString();           //template
                    myReader.FPLoad(employeeID, fingerIndex, fingerTemplate, TemplateSafetyKey);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            try
            {
                foreach (Control ctl in this.Controls)
                {
                    ctl.Enabled = true;
                }
                DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm();
                myReader.FPIdentificationID     += new FPReader.FPIdentificationIDEventHandler(MyReader_FPIdentificationID);
                myReader.FPIdentificationStatus += new FPReader.FPIdentificationStatusEventHandler(MyReader_FPIdentificationStatus);
                myReader.FPIdentificationStart(5);
                timer1.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
 private void MyReader_FPIdentificationID(string ID, FPReader.FingerIndex FpIndex)
 {
     instructor_FingerID = ID.Trim();
 }