public void getPlayers() { players.Children.Clear(); var d = mainWindow.Client.getRoomState(this.gameID); driver_lbl.Text = d[0]; d.RemoveAt(0); foreach (var name in d) { var new_game = new lobby_user(name); players.Children.Add(new_game); } }
private void backgroundWorker1_ProgressChanged(object sender, ProgressChangedEventArgs e) { players.Children.Clear(); var d = mainWindow.Client.getRoomState(this.gameID); driver_lbl.Text = d[0]; d.RemoveAt(0); foreach (var name in d) { var new_game = new lobby_user(name); players.Children.Add(new_game); System.Console.WriteLine(name); } }