private void Menu_LogIn(object sender, LoginLocalEventArgs e) { ActiveAdmin = e.admin; MainAdminLocal a = new MainAdminLocal(); a.Show(); login.Enabled = false; }
private void BLoginAdmin_Click(object sender, EventArgs e) { string mail = UsuarioIng.Text; string clave = UsuarioCont.Text; List <AdminLocal> admins_local = Metodos.DeserializarAdminsLocal(); AdminLocal loginlocal = Metodos.LogInAdmin(admins_local, mail, clave); if (loginlocal == null) { MessageBox.Show("Error en contraseña o correo\n" + admins_local[0].GetInfo(), "Error"); Metodos.SerializarAdminsLocal(admins_local); UsuarioCont.Text = ""; } else { LoginLocalEventArgs inicia = new LoginLocalEventArgs(); inicia.admin = loginlocal; AUser.AdminLocalA = loginlocal; OnLogInL(this, inicia); this.Hide(); Metodos.SerializarAdminsLocal(admins_local); } }