Exemplo n.º 1
0
 protected void OnServerUpdated(object sender, ServerUpdatedEventArgs data)
 {
     if (ServerUpdated != null)
     {
         ServerUpdated(this, data);
     }
 }
Exemplo n.º 2
0
        void gameServer_ServerUpdated(object sender, ServerUpdatedEventArgs data)
        {
            dataGridPlayers.Invoke(new MethodInvoker(() =>
            {
                dataGridPlayers.DataSource = data.Participants.ToList();

                for (int i = 0; i < dataGridPlayers.Columns.Count; i++)
                {
                    dataGridPlayers.Columns[i].Visible = false;
                }

                dataGridPlayers.Columns["Nickname"].Visible = true;

                lblPlayers.Text = "Players: " + data.Participants.Count();
            }));
        }