Exemple #1
0
        public ImageFrm()
        {
            InitializeComponent();
            m_DelegateSetImage      = new SetImageDelegate(this.SetImage);
            m_DelegateWriteResults  = new WriteResultsDelegate(this.WriteResults);
            m_CaptureThreadFinished = new DelegateCaptureThreadFinished(this.CaptureFinished);
            m_MatchThreadFinished   = new DelegateMatchThreadFinished(this.MatchFinished);
            m_CaptureWithPDFinished = new DelegateCaptureWithPDFinished(this.CaptureWithPDFinished);
            del = new LumiSDKWrapper.LumiAcqStatusCallbackDelegate(this.AcqStatusCallback);

            // Set PD Capture flag
            m_bPDCaptureInProcess = false;
            // Set Cancel Capture state
            m_bCancelCapture = false;

            try
            {
                // Open the scanner
                SDKBiometrics.OpenScanner();
                // Get Current Timeout
                LumiSDKWrapper.LUMI_CONFIG config = new LumiSDKWrapper.LUMI_CONFIG();
                SDKBiometrics.GetConfig(ref config);
                this.txtTriggerTimeout.Text = config.nTriggerTimeout.ToString();
            }
            catch (Exception err)
            {
                MessageBox.Show(err.Message, "Error");
                DisableControls();
                return;
            }
        }
Exemple #2
0
 private void SetImage(Bitmap img)
 {
     if (screen.InvokeRequired)
     {
         var invoke = new SetImageDelegate(SetImage);
         screen.Invoke(invoke, new object[] { img });
     }
     else
     {
         screen.Image = img;
     }
 }
Exemple #3
0
 /// <summary>
 /// A thread safe method to set the image displayed in the picture box.
 /// </summary>
 /// <param name="image">The new image to display</param>
 private void SetPictureBoxImage(Bitmap image)
 {
     if (pictureBox1.InvokeRequired)
     {
         SetImageDelegate d = new SetImageDelegate(SetPictureBoxImage);
         pictureBox1.Invoke(d, new object[] { image });
     }
     else
     {
         pictureBox1.Image = image;
     }
 }
        private void SetImage(Bitmap image)
        {
            try
            {
                if (this.pictureBox1.InvokeRequired)
                {
                    SetImageDelegate callback = new SetImageDelegate(SetImage);
                    this.BeginInvoke(callback, image);
                }
                else
                {
                    if (image == null)
                    {
                        pictureBox1.InitialImage = image;
                    }

                    pictureBox1.Image = image;
                }
            }
            catch (Exception e) {
                log.LogFatal("Call to Set Image Failed with an Exception.", null, e);
            };
        }