private void btnAceptar_Click(object sender, EventArgs e) { if (string.IsNullOrWhiteSpace(txtNombre.Text)) { MessageBox.Show("Ingrese su nombre"); } if (!chbTeclado.Checked && !chbVoz.Checked) { MessageBox.Show("Seleccione un método de entrada"); return; } else { VentanaJuego vj = new VentanaJuego(txtNombre.Text, conexion, chbTeclado.Checked); vj.Visible = true; } }
public Cliente(VentanaJuego f, TcpClient tc, string nombre) { this.f = f; //TcpClient tc = new TcpClient("localhost", 1993); recibirYEnviarDatos(tc, nombre); //recibir id /*byte[] datos = new byte[256]; * NetworkStream stream = tc.GetStream(); * string respuesta = string.Empty; * Int32 bytes = stream.Read(datos, 0, datos.Length); * respuesta = System.Text.Encoding.ASCII.GetString(datos, 0, bytes); * id = int.Parse(respuesta);*/ //termina recibir id ac = new AyudanteCliente(tc, this); mensajesChat = new Queue <MensajeChat>(); }
public dialogoMensaje(VentanaJuego ventana) { InitializeComponent(); vj = ventana; }