Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            String  usuario = txt_usuario.Text;
            String  clave   = txt_clave.Text;
            Jugador jugador = (new Conexion()).login(usuario, clave);

            if (jugador != null)
            {
                Inicio inicio = new Inicio(jugador);
                inicio.Show();
                this.Dispose();
            }
            else
            {
                MessageBox.Show("Usuario y/o contraseña incorrecto");
            }
        }
Ejemplo n.º 2
0
 private void del_cerrar(Control c = null, int x = 0, int y = 0)
 {
     try
     {
         if (InvokeRequired)
         {
             del      mover      = new del(del_ganador);
             Object[] parametros = new Object[] { c, x, y };
             Invoke(mover, parametros);
         }
         else
         {
             Inicio inicio = new Inicio(_jugador);
             inicio.Show();
             this.Dispose();
         }
     }
     catch { }
 }
Ejemplo n.º 3
0
 private void del_ganador(Control c = null, int x = 0, int y = 0)
 {
     try
     {
         if (InvokeRequired)
         {
             del      mover      = new del(del_ganador);
             Object[] parametros = new Object[] { c, x, y };
             Invoke(mover, parametros);
         }
         else
         {
             this.label1.Text    = "El ganador es: " + _partida.Ganador;
             this.label1.Visible = true;
             Inicio inicio = new Inicio(_jugador);
             inicio.Show();
             this.Dispose();
         }
     }
     catch { }
 }