Example #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            string pass = textBox1.Text;
            string key  = textBox2.Text;

            if (!(File.Exists(path1.Path1)))
            {
                string b64key1 = Encrypt.Encrypt(pass);
                Form2  s       = new Form2(b64key1);
                s.ShowDialog();
                this.Hide();
            }
            else
            {
                string pass1 = Decod.Decod(key);
                if (pass1 == pass)
                {
                    string b64key1 = Encrypt.Encrypt(pass);
                    Form2  s       = new Form2(b64key1);
                    s.ShowDialog();
                    this.Hide();
                }
                else
                {
                    textBox2.Text = "";
                    MessageBox.Show("Неверный ввод!");
                }
            }
        }
Example #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Hide();
            string str1  = textBox1.Text;
            string pass1 = Decod.Decod(keyshow);

            if (str1 == pass1)
            {
                string pass    = textBox2.Text;
                string b64key1 = Encrypt.Encrypt(pass);
                MessageBox.Show("Пароль успешно изменён");
                Form2 s = new Form2(b64key1);
                s.ShowDialog();
                this.Hide();
            }
            else
            {
                textBox1.Text = "";
                MessageBox.Show("Неверный ввод!");
            }
        }