protected virtual void Enviar(LIB.Clases.Usuario us) { us.Nombre = TbNombre.Text; us.Apellido = TbApellido.Text; us.Edad = DTPEdad.Value; if (RbHombre.Checked == true) { us.Genero = true; } else { us.Genero = false; } if (TbComentario.Lines != null) { us.Comentario = TbComentario.Lines; } if (CBExperiencia.SelectedIndex > -1 & CBExperiencia.SelectedItem != null) { us.Experiencia = CBExperiencia.SelectedItem.ToString(); } Usuario.Guardar(); CompStandar.ReescribirText_Label(LTitulo, "Guardado", Color.Black); }
//Button Cancelar private void BCancelar_Click(object sender, EventArgs e) { TBUsuario.Text = ""; TBClave.Text = ""; if (LClave.ForeColor != Color.Black) { CompStandar.ReescribirText_Label(LClave, "Clave:", Color.Black); } PClaveConf.Visible = true; ConfirmarClave(); TBClave.PasswordChar = '\0'; BPass_Click(sender, e); }
private async void BIniciar_MouseLeave(object sender, EventArgs e) { if (LUser.ForeColor == Color.Red) { await CompStandar.ColorLabelAsync(this, LUser, Color.Black, 700); } if (LTitulo.Text != "Iniciar Sesion") { CompStandar.ReescribirText_Label(LTitulo, "Iniciar Sesion", Color.Black); } if (LClave.ForeColor == Color.Red) { await CompStandar.ColorLabelAsync(this, LClave, Color.Black, 400); } CompStandar.BorderMouseLeave(Button: BIniciar); }
private void BBien_Click(object sender, EventArgs e) { ConfirmarClave(); if (TBClave.Text == TBClaveConf.Text) { claveConf = true; CompStandar.ReescribirText_Label (LClave, "Clave:", Color.Green); } else { claveConf = false; CompStandar.ReescribirText_Label (LClave, "Clave:", Color.Red); } TBClaveConf.Text = ""; }
// Button Iniciar private void Iniciar() { var Loggin = new Clases.Data.Login(); if ((TBUser.Text != string.Empty) && (TBClave.Text != string.Empty)) { Loggin.CargarIdenty(TBUser.Text, TBClave.Text); } if (Clases.Data.Login.identy != null) { Close(); } else { LUser.ForeColor = Color.Red; CompStandar.ReescribirText_Label(LTitulo, "Incorrecto", Color.Red); LClave.ForeColor = Color.Red; CompStandar.ReescribirText_Label(LTitulo, "Incorrecto", Color.Red); } }