Exemple #1
0
 private void button1_Click_1(object sender, EventArgs e)
 {
     if (pass)
     {
         if (Application.UserAppDataRegistry.GetValue("username").ToString() == textBox1.Text && Application.UserAppDataRegistry.GetValue("passwd").ToString() == textBox2.Text)
         {
             Hide();
             encry enc = new encry();
             enc.ShowDialog();
             Close();
         }
         else
         {
             MessageBox.Show("Wrong UserName or Password");
             textBox2.Text = String.Empty;
         }
     }
     else if (textBox1.Text == String.Empty || textBox2.Text == String.Empty)
     {
         MessageBox.Show("Fill All The Fields", "Incomplete Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     else
     {
         Application.UserAppDataRegistry.SetValue("username", textBox1.Text);
         Application.UserAppDataRegistry.SetValue("passwd", textBox2.Text);
         MessageBox.Show("Login Credentials Set, use this Credentials from now to Login\nRe-Open the applicaion to use", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
         this.Close();
     }
 }
Exemple #2
0
        private void button3_Click(object sender, EventArgs e)
        {
            this.Hide();
            encry en = new encry();

            en.ShowDialog();
            this.Close();
        }