Exemple #1
0
 private void device_ImageAcquiringProgress(object sender, ImageAcquiringProgressEventArgs e)
 {
     if (this._cancelTransferBecauseFormIsClosing)
     {
         ((Device)sender).CancelTransfer();
         return;
     }
     this.imageAcquisitionProgressBar.Value = e.Progress;
     if (this.imageAcquisitionProgressBar.Value == 100)
     {
         this.WaitPic.Visible = false;
         this.imageAcquisitionProgressBar.Value = 0;
     }
     Application.DoEvents();
 }
        /// <summary>
        /// Image acquiring progress is changed.
        /// </summary>
        private void _device_ImageAcquiringProgress(object sender, ImageAcquiringProgressEventArgs e)
        {
            // image acquistion must be canceled because application's window is closing
            if (_cancelTransferBecauseWindowIsClosing)
            {
                // cancel image acquisition
                _currentDevice.CancelTransfer();
                return;
            }

            imageAcquisitionProgressBar.Value = (int)e.Progress;

            if (imageAcquisitionProgressBar.Value == 100)
            {
                imageAcquisitionProgressBar.Value = 0;
            }
        }
        /// <summary>
        /// Image acquiring progress is changed.
        /// </summary>
        private void device_ImageAcquiringProgress(object sender, ImageAcquiringProgressEventArgs e)
        {
            // image acquistion must be canceled because application's form is closing
            if (trasferenciaCanceladaPorFormFechado)
            {
                Device device = (Device)sender;
                // cancel image acquisition
                device.CancelTransfer();
                return;
            }

            imageAcquisitionProgressBar.Value = (int)e.Progress;

            if (imageAcquisitionProgressBar.Value == 100)
            {
                imageAcquisitionProgressBar.Value = 0;
            }

            Application.DoEvents();
        }
 private void _device_ImageAcquiringProgress(object sender, ImageAcquiringProgressEventArgs e)
 {
     // actionLabel.Text = "Image scan..."
     // actionProgressBar.Value = CInt(e.Progress)
     // If actionProgressBar.Value = 100 Then
     // actionProgressBar.Value = 0
     // actionLabel.Text = ""
     // End If
     Application.DoEvents();
 }