Beispiel #1
0
        public void crearForm(string nombre)
        {
            Form2 n = new Form2();

            n.setNomInvitacion(nombre);
            n.ShowDialog();
            bool res = n.getRespuesta();

            if (res == true)
            {
                MessageBox.Show("Has aceptado");
                string mensaje = "14/" + nombre + "/" + this.mi_nom + "/true";
                byte[] msg     = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            else
            {
                MessageBox.Show("Has rechazado");
                string mensaje = "14/" + nombre + "/" + this.mi_nom + "/false";
                byte[] msg     = System.Text.Encoding.ASCII.GetBytes(mensaje);
                server.Send(msg);
            }
            res = this.res_partida;
        }