Ejemplo n.º 1
0
        private void ShowSnapshot(Bitmap snapshot)
        {
            if (checkBox_calibrated.Checked == false)
            {
                if (InvokeRequired)
                {
                    Invoke(new Action <Bitmap>(ShowSnapshot), snapshot);
                }
                else
                {
                    if (snapshotForm == null)
                    {
                        snapshotForm             = new SnapshotForm();
                        snapshotForm.FormClosed += new FormClosedEventHandler(snapshotForm_FormClosed);
                        snapshotForm.Show();
                    }

                    snapshotForm.SetImage(snapshot);
                }
            }
            else // rozpoznajemy
            {
                if (InvokeRequired)
                {
                    Invoke(new Action <Bitmap>(ShowSnapshot), snapshot);
                }
                else
                {
                    if (snapshotForm == null)
                    {
                        recognizeform             = new RecognizeForm();
                        recognizeform.FormClosed += new FormClosedEventHandler(recognizeform_FormClosed);
                        recognizeform.Show();
                    }

                    recognizeform.SetImage(snapshot);
                }
            }
        }
Ejemplo n.º 2
0
 private void button1_Click(object sender, EventArgs e)
 {
     recognizeform = new RecognizeForm();
     recognizeform.Show();
 }
Ejemplo n.º 3
0
 private void recognizeform_FormClosed(object sender, FormClosedEventArgs e)
 {
     recognizeform = null;
 }