protected override void bulkOCRToolStripMenuItem_Click(object sender, EventArgs e) { if (backgroundWorkerBulk != null && backgroundWorkerBulk.IsBusy) { backgroundWorkerBulk.CancelAsync(); return; } if (bulkDialog == null) { bulkDialog = new BulkDialog(); } bulkDialog.InputFolder = inputFolder; bulkDialog.OutputFolder = outputFolder; bulkDialog.OutputFormat = outputFormat; if (bulkDialog.ShowDialog() == DialogResult.OK) { inputFolder = bulkDialog.InputFolder; outputFolder = bulkDialog.OutputFolder; outputFormat = bulkDialog.OutputFormat; this.toolStripStatusLabel1.Text = Properties.Resources.OCRrunning; this.Cursor = Cursors.WaitCursor; this.pictureBox1.UseWaitCursor = true; this.textBox1.Cursor = Cursors.WaitCursor; this.toolStripProgressBar1.Enabled = true; this.toolStripProgressBar1.Visible = true; this.toolStripProgressBar1.Style = ProgressBarStyle.Marquee; this.bulkOCRToolStripMenuItem.Text = Properties.Resources.CancelBulkOCR; if (this.statusForm.IsDisposed) { this.statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BulkProcessStatus; } if (!this.statusForm.Visible) { this.statusForm.Show(); } else if (this.statusForm.WindowState == FormWindowState.Minimized) { this.statusForm.WindowState = FormWindowState.Normal; } this.statusForm.BringToFront(); this.statusForm.TextBox.AppendText("\t-- " + Properties.Resources.Beginning_of_task + " --" + Environment.NewLine); // start bulk OCR stopWatch.Start(); this.backgroundWorkerBulk.RunWorkerAsync(); } }
private void backgroundWorkerBulk_ProgressChanged(object sender, ProgressChangedEventArgs e) { if (this.statusForm.IsDisposed) { this.statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BulkProcessStatus; } if (!this.statusForm.Visible) { this.statusForm.Show(); } this.statusForm.TextBox.AppendText((string)e.UserState + Environment.NewLine); }
private void OnTimedEvent(Object sender, EventArgs e) { if (queue.Count > 0) { if (this.statusForm.IsDisposed) { this.statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BatchProcessStatus; } if (!this.statusForm.Visible) { this.statusForm.Show(); } Thread t = new Thread(new ThreadStart(AutoOCR)); t.Start(); } }
public GUIWithBatch() { InitializeComponent(); statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BatchProcessStatus; }
public GUIWithBulkOCR() { InitializeComponent(); statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BulkProcessStatus; }
public GUIWithSettings() { InitializeComponent(); statusForm = new StatusForm(); statusForm.Text = Properties.Resources.BatchProcessStatus; }