Exemple #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "" || textBox6.Text == "" || textBox10.Text == "" || textBox11.Text == "")
            {
                MessageBox.Show("There is missing data please check your Name, age, gender, National Id, Date and Analysis ");
            }
            else
            {
                try
                {
                    Convert.ToInt32(textBox3.Text);

                    if (textBox2.Text != "" && textBox3.Text != "" && comboBox1.Text != "" && textBox6.Text != "" && textBox10.Text != "")
                    {
                        Preview Preview = new Preview(textBox2.Text, textBox3.Text, comboBox1.Text, textBox6.Text, textBox9.Text, textBox8.Text, textBox5.Text,
                                                      textBox1.Text, textBox7.Text, textBox10.Text, label13.Text, textBox11.Text);
                        Preview.ShowDialog();
                    }
                }
                catch { MessageBox.Show("You must enter Numerical value in age of the patient"); }
            }
        }
        //public static Image returnCapture()
        //{

        //}
        private void buttonSnapshotOutputFrame_Click(object sender, EventArgs e)
        {
            try
            {
                if (!cameraControl.CameraCreated)
                {
                    return;
                }

                Bitmap bitmap = cameraControl.SnapshotOutputImage();

                if (bitmap == null)
                {
                    return;
                }

                pictureBoxScreenshot.Image = bitmap;

                //pic.Update();
                //pic.Image = bitmap;
                //pic.Update();

                pictureBoxScreenshot.Update();

                Preview previewForm = new Preview(pictureBoxScreenshot.Image);
                cameraControl.CloseCamera();
                this.Hide();
                previewForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Please wait for the image to be loaded!", "Message");
            }

            //Helper.SaveImageCapture(pictureBoxScreenshot.Image);
        }