void performOCR(IList<Image> imageList, int index, Rectangle rect) { try { if (curLangCode.Trim().Length == 0) { MessageBox.Show(this, Properties.Resources.selectLanguage, strProgName); return; } this.toolStripStatusLabel1.Text = Properties.Resources.OCRrunning; this.Cursor = Cursors.WaitCursor; this.pictureBox1.UseWaitCursor = true; this.textBox1.Cursor = Cursors.WaitCursor; this.toolStripBtnOCR.Enabled = false; this.oCRToolStripMenuItem.Enabled = false; this.oCRAllPagesToolStripMenuItem.Enabled = false; this.toolStripProgressBar1.Enabled = true; this.toolStripProgressBar1.Visible = true; this.toolStripProgressBar1.Style = ProgressBarStyle.Marquee; OCRImageEntity entity = new OCRImageEntity(imageList, index, rect, curLangCode); entity.ScreenshotMode = this.screenshotModeToolStripMenuItem.Checked; // Start the asynchronous operation. backgroundWorkerOcr.RunWorkerAsync(entity); } catch (Exception ex) { Console.WriteLine(ex.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)