Beispiel #1
0
        //-------------------------------------------------------------------------
        private void RecognizeAll(bool alignmentOnly)
        {
            if (backgroundWorker.IsBusy)
                return;
            SetCancelSource();
            if (!isRotate && rec.Bitmap.Width > rec.Bitmap.Height)
                rec.Bitmap.RotateFlip(RotateFlipType.Rotate270FlipNone);
            animatedTimer = new AnimatedTimer();
            animatedTimer.Tick += animatedTimer_Tick;
            rec.BubbleItems.Clear();
            BarCodeItems.Clear();
            //BubblesAC.Clear();
            pnlBubbles.Controls.Clear(); //
            bac = new BubblesAreaControl();
            rec.factRectangle = new Rectangle[0];
            VerifyButton.Enabled = false;
            rbtnGrid.Enabled = true;
            RecognizeAllButton.Enabled = false;
            RecognizeBubblesButton.Enabled = false;
            StopRecognizeButton.Enabled = true;

            UpdateUI("StatusLabel", "Search markers, please wait ...");
            ShowImage(false);

            var value = (BoxSheet.SelectedIndex == -1) ? "" : BoxSheet.SelectedItem.ToString();
            var text = (alignmentOnly) ? "RecAllAlignmentOnly" : "RecAll";
            backgroundWorker.RunWorkerAsync(new string[] { text, value });
            if (rec.BarCodesPrompt != "Rotate180")// && rpf != null
                ShowProcessingForm();
            else
                rec.BarCodesPrompt = "";
        }
Beispiel #2
0
 //-------------------------------------------------------------------------
 private void DeleteTempFiles(string fn1, string fn2, bool toRecycleBin = false)
 {
     SetCancelSource();
     pictureBox1.Image = null;
     if (animatedTimer != null)
     {
         animatedTimer.StopAnimation();
         animatedTimer = null;
     }
     if (rec != null)
     {
         rec.Dispose();
         rec = null;
     }
     //try
     //{
     //    vb.FileIO.FileSystem.DeleteFile(fn1, vb.FileIO.UIOption.OnlyErrorDialogs, vb.FileIO.RecycleOption.SendToRecycleBin);
     //}
     //catch (Exception)
     //{
     //}
     ioHelper.DeleteFileExt(toRecycleBin, fn1);
     ioHelper.DeleteFileExt(toRecycleBin, fn2);
     InitButtonsAndControls();
     timer1.Start();
 }