BF2Statistics.MainForm.GamepsyServer_OnUpdate C# (CSharp) Method

GamepsyServer_OnUpdate() private method

This method updates the connected clients area of the login emulator tab
private GamepsyServer_OnUpdate ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
        private void GamepsyServer_OnUpdate(object sender, EventArgs e)
        {
            // DO processing in this thread
            int PeakClients = Int32.Parse(labelPeakClients.Text);
            int Connected = GamespyEmulator.NumClientsConnected;
            if (PeakClients < Connected)
                PeakClients = Connected;

            // Update connected clients count, and list, on main thread
            BeginInvoke((Action)delegate
            {
                ClientCountLabel.Text = Connected.ToString();
                labelPeakClients.Text = PeakClients.ToString();
                if (tabControl1.SelectedIndex == 2 && RefreshChkBox.Checked)
                    BuildClientsList();
            });
        }
MainForm