void ponerListaJugadores(string[] jugadores) { try { if (listBox1.InvokeRequired) { ponerListaJugadoresDelegate d = new ponerListaJugadoresDelegate(ponerListaJugadores); this.Invoke(d, new object[] { jugadores }); } else { int i = 0; listilla = usuario + ":"; listBox1.Items.Clear(); while (i < jugadores.Count()) { if (jugadores[i] != "*") { listBox1.Items.Add(jugadores[i]); listilla = listilla + ":" + jugadores[i]; } else i = jugadores.Count(); i++; } } } catch (ObjectDisposedException) { } }
void ponerListaJugadores(string[] jugadores) { try { if (listBox1.InvokeRequired) { ponerListaJugadoresDelegate d = new ponerListaJugadoresDelegate(ponerListaJugadores); this.Invoke(d, new object[] { jugadores }); } else { int i = 0; listilla = usuario + ":"; listBox1.Items.Clear(); while (i < jugadores.Count()) { if (jugadores[i] != "*") { listBox1.Items.Add(jugadores[i]); listilla = listilla + ":" + jugadores[i]; } else { i = jugadores.Count(); } i++; } } } catch (ObjectDisposedException) { } }
public void ponerListaJugadores(string[] jugadores) { if (listBox1.InvokeRequired) { ponerListaJugadoresDelegate d = new ponerListaJugadoresDelegate(ponerListaJugadores); this.Invoke(d, new object[] { jugadores }); } else { int i = 0; listBox1.Items.Clear(); listBox2.Items.Clear(); listBox2.Items.Add(usuario); listaInvitados = listaInvitados + ":" + usuario; cont++; while (i < jugadores.Count()) { if (jugadores[i] != "*") { listBox1.Items.Add(jugadores[i]); } else { i = jugadores.Count(); } i++; } } }
public void ponerListaJugadores(string[] jugadores) { if (listBox1.InvokeRequired) { ponerListaJugadoresDelegate d = new ponerListaJugadoresDelegate(ponerListaJugadores); this.Invoke(d, new object[] { jugadores }); } else { int i = 0; listBox1.Items.Clear(); listBox2.Items.Clear(); listBox2.Items.Add(usuario); listaInvitados = listaInvitados + ":" + usuario; cont++; while (i < jugadores.Count()) { if (jugadores[i] != "*") listBox1.Items.Add(jugadores[i]); else i = jugadores.Count(); i++; } } }