Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     string pwNow;
     string pwSalt;
     string hNow;
     DF();
     string check = dt.Rows[0][2].ToString();
     pwNow = textBox1.Text;
     pwSalt = dt.Rows[0][3].ToString();
     hNow = sha1(pwNow + pwSalt);
     if (hNow == check)
     {
         this.Close();
         Form4 form4 = new Form4(this);
         form4.RefToForm1 = RefToForm1;
         form4.Show();
     }
     else
     {
         MessageBox.Show("Неправильный пароль");
     }
 }
Ejemplo n.º 2
0
 private void button2_Click(object sender, EventArgs e)
 {
     Form7 obj7 = new Form7(this);
     obj7.RefToForm1 = this;
     Form4 obj4 = new Form4(obj7);
     obj4.RefToForm1 = this;
     this.Visible = false;
     obj7.Show();
 }