Example #1
0
        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) { }
        }
Example #2
0
        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) { }
        }
Example #3
0
 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++;
         }
     }
 }
Example #4
0
 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++;
         }
     }
 }