Пример #1
0
        private void diferenciaciónToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                ImageForm Image1 = (ImageForm)ActiveMdiChild;
                OpenFileDialog OpenFile = new OpenFileDialog();
                OpenFile.Filter = " Archivos JPEG(*.jpg)|*.jpg| Archivos TIFF(*.tif, *.tiff)|*.tif; *.tiff";
                OpenFile.InitialDirectory = "C:\\Users\\Jose\\Desktop\\Imagenes";
                if (OpenFile.ShowDialog() == DialogResult.OK)
                {
                    ImageForm ImageForm = new ImageForm();
                    ImageForm.MdiParent = this;
                    ImageForm.Show();
                    String Dir = OpenFile.FileName;
                    ImageForm.Text = Dir;
                    ImageForm.OpenImage(Dir);
                    ImageForm.Show();
                    ImageForm ImageDifference = new ImageForm();
                    ImageDifference.MdiParent = this;
                    ImageDifference.DifferencePart1(Image1.getPicture(), ImageForm.getPicture());
                    ImageDifference.Show();

                }
            }
            catch (NullReferenceException)
            {
                MessageBox.Show("No hay ninguna foto seleccionada");
            }
        }