private void txtCorreo_Leave(object sender, EventArgs e) { if (txtCorreo.Text != "") { if (this.brHome.ValidateEmailFormat(txtCorreo.Text) == true) { Boolean exists = this.ValidateExistsEmail(); if (exists == true) { nameForm = "LoginAnimus"; msgForm = "La cuenta de correo existe, debe ingresar por la opción ya tengo una cuenta."; msgNotification ms = new msgNotification(); ms.ShowDialog(); return; } } else { txtCorreo.Text = string.Empty; txtNick.Text = string.Empty; nameForm = "LoginAnimus"; msgForm = "El campo correo electrónico no tiene un formato correcto."; msgNotification ms = new msgNotification(); ms.ShowDialog(); } } }
private void btnRegistro_Click(object sender, EventArgs e) { string msg = string.Empty; if (ValidateFields(out msg) == false) { nameForm = "LoginAnimus"; msgForm = msg; msgNotification ms = new msgNotification(); ms.ShowDialog(); return; } //si el email ya existe lo tengo que mandar a iniciar session Boolean exists = this.ValidateExistsEmail(); if (exists == true) { txtCorreo.Text = string.Empty; txtNick.Text = string.Empty; nameForm = "LoginAnimus"; msgForm = "La cuenta de correo existe, debe ingresar por la opción ya tengo una cuenta."; msgNotification ms = new msgNotification(); ms.ShowDialog(); return; } CoHome home = new CoHome(); home.nick = txtNick.Text; home.mail = txtCorreo.Text; home.password = txtPassword.Text; Boolean internetStatus = true; CoSesion session = null; home = this.brHome.Registry(home, out session, out internetStatus); if (!internetStatus) { this.InternetStatus(internetStatus); return; } else { this.Hide(); ControlCenter controlCenter = new ControlCenter(home, session); controlCenter.ShowDialog(); } }