Exemplo n.º 1
0
        private void btnDecrypt_Click(object sender, EventArgs e)
        {
            Stopwatch s = new Stopwatch();

            s.Start();
            if (ImageMatrix != null && txtIntialSeed.Text.Length > 0 && txtTape.Text.Length > 0)
            {
                ImageOperations.Encrypt_Decrypt(ref ImageMatrix, txtIntialSeed.Text, Convert.ToInt32(txtTape.Text));
                label4.Text = "Decrypt Image";
                ImageOperations.DisplayImage(ImageMatrix, pictureBox2);
            }
            else if ((txtIntialSeed.Text.Length == 0 || txtTape.Text.Length == 0) && ImageMatrix != null)
            {
                MessageBox.Show("Enter Intial Seed & Tape Position");
            }
            else
            {
                MessageBox.Show(" Open Image ");
            }
            s.Stop();
            txtTime.Text = Convert.ToString(s.Elapsed);
        }