Ejemplo n.º 1
0
 private void comboBoxConnectedUsersRefresh(ServerStatus status)
 {
     comboBoxConnectedUsers.Items.Clear();
     comboBoxConnectedUsers.Items.Add(" ");
     foreach (String s in status.GetClientIdsConnected())
     {
         comboBoxConnectedUsers.Items.Add(s);
     }
     comboBoxConnectedUsers.Invalidate();
 }
Ejemplo n.º 2
0
        private void OnDataChanged(object sender, ServerStatus status)
        {
            labelStatus.BeginInvoke(new MethodInvoker(delegate
            {
                if (status.IsOnline())
                {
                    labelStatus.Text = "Online " + status.GetNumOnlineClients() + "/" + status.GetMaxClients();
                }
                else
                {
                    labelStatus.Text = "Offline 0/0";
                }

                if (comboBoxConnectedUsers.Items.Count != status.GetClientIdsConnected().Count)
                {
                    comboBoxConnectedUsersRefresh(status);
                }
            }));
        }