void UpdatePlayers() { RunOnUiThread( delegate { pl_listBox.Items.Clear(); UpdateNotifyIconText(); Player[] players = PlayerInfo.Online.Items; foreach (Player p in players) { pl_listBox.Items.Add(p.name); } if (curPlayer == null) { return; } if (PlayerInfo.FindExact(curPlayer.name) != null) { return; } curPlayer = null; playerProps = null; pl_gbProps.Text = "Properties for (none selected)"; pl_pgProps.SelectedObject = null; }); }
void Players_SetSelected(string name, PlayerProperties props) { playerProps = props; pl_gbProps.Text = "Properties for " + name; pl_pgProps.SelectedObject = props; Players_UpdateButtons(); }
void pl_listBox_Click(object sender, EventArgs e) { Player p = PlayerInfo.FindExact(pl_listBox.Text); if (p == null || p == curPlayer) { return; } pl_statusBox.Text = ""; Players_AppendStatus("==" + p.name + "=="); playerProps = new PlayerProperties(p); pl_gbProps.Text = "Properties for " + p.name; pl_pgProps.SelectedObject = playerProps; curPlayer = p; Players_UpdateSelected(); }
void LoadPlayerTabDetails(object sender, EventArgs e) { Player p = PlayerInfo.FindExact(pl_listBox.Text); if (p == null || p == curPlayer) { return; } pl_statusBox.Text = ""; AppendPlayerStatus("==" + p.name + "=="); playerProps = new PlayerProperties(p); pl_gbProps.Text = "Properties for " + p.name; pl_pgProps.SelectedObject = playerProps; curPlayer = p; try { UpdatePlayerMapCombo(); } catch { } }
void Players_UpdateList() { pl_listBox.Items.Clear(); Player[] players = PlayerInfo.Online.Items; foreach (Player p in players) { pl_listBox.Items.Add(p.name); } if (curPlayer == null) { return; } if (PlayerInfo.FindExact(curPlayer.name) != null) { return; } curPlayer = null; playerProps = null; pl_gbProps.Text = "Properties for (none selected)"; pl_pgProps.SelectedObject = null; }