示例#1
0
 private void btnSignInClick(object sender, EventArgs e)
 {
     try
     {
         frm_steamLibrary libraryForm = new frm_steamLibrary();
         if (txtPassword.Text.Length < 3)
         {
             MessageBox.Show("Password must have at least 3 characters");
             frmLogin_Load(new object(), new EventArgs());
             return;
         }
         libraryForm.usuario = new User(txtUsername.Text, txtPassword.Text);
         this.Hide();
         libraryForm.ShowDialog();
         this.Show();
         frmLogin_Load(new object(), new EventArgs());
     }
     catch
     {
         MessageBox.Show("Invalid username or password");
         frmLogin_Load(new object(), new EventArgs());
     }
 }
示例#2
0
 private void btnSignInClick(object sender, EventArgs e)
 {
     try
     {
         frm_steamLibrary libraryForm = new frm_steamLibrary();
         if (txtPassword.Text.Length < 3)
         {
             MessageBox.Show("Password must have at least 3 characters");
             frmLogin_Load(new object(), new EventArgs());
             return;
         }
         libraryForm.usuario = new User(txtUsername.Text, txtPassword.Text);
         this.Hide();
         libraryForm.ShowDialog();
         this.Show();
         frmLogin_Load(new object(), new EventArgs());
     }
     catch
     {
         MessageBox.Show("Invalid username or password");
         frmLogin_Load(new object(), new EventArgs());
     }
 }