private void Recognize() { if (chkShowProgress.Checked) { formn1 = new FormDraw(); formn1.Opacity = 1.0; formn1.BackColor = Color.Black; formn1.Width = 200; formn1.Height = 20; formn1.Left = 0; formn1.Top = Screen.PrimaryScreen.Bounds.Height - formn1.Height; formn1.Paint += new PaintEventHandler(formn1_Paint); formn1.Show(); } txtResult.Text = ""; resulttext = ""; language = getLanguage(); btnOpen.Enabled = false; btnRegion.Enabled = false; btnRecognize.Enabled = false; lblStatus.Text = "Contacting " + apiurl + " ..."; lblStatus.ForeColor = SystemColors.ControlText; lblStatus.BackColor = Color.Yellow; Thread t = new Thread(new ParameterizedThreadStart(RecognizeThread)); t.Start(this); }
private void btnRegion_Click(object sender, EventArgs e) { formd1 = new FormDraw(); formd1.VisibleChanged += new EventHandler(this.FormDrawOnVisible); formd1.Show(); this.WindowState = FormWindowState.Minimized; formd1.Activate(); }
private void RecognizeFinish() { if (formn1 != null) { formn1.Hide(); formn1.Dispose(); formn1 = null; } txtResult.Text = resulttext; btnOpen.Enabled = true; btnRegion.Enabled = true; btnRecognize.Enabled = true; lblStatus.Text = imagesize + " Done"; lblStatus.ForeColor = SystemColors.ControlText; lblStatus.BackColor = Color.LightGreen; if (chkAutocopy.Checked) { btnCopy_Click(this, null); } }