Esempio n. 1
0
        /// <summary>
        /// Updates the score board.
        /// </summary>
        void UpdateScoreBoard()
        {
            if (this.listAllUsers.InvokeRequired)
            {
                UpdateScoreBoardCallback d = new UpdateScoreBoardCallback(UpdateScoreBoard);
                this.Invoke(d);
            }
            else
            {
                //Clears the current score board and list the new one
                listAllUsers.Items.Clear();

                for (int i = 0; i < Globals.Players.Names.Count; i++)
                {
                    listAllUsers.Items.Add(new ListViewItem(new[] { Globals.Players.Names[i], Globals.Players.Scores[i] }));
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Updates the score board.
        /// </summary>
        void UpdateScoreBoard()
        {
            if (this.listAllUsers.InvokeRequired)
            {
                UpdateScoreBoardCallback d = new UpdateScoreBoardCallback(UpdateScoreBoard);
                this.Invoke(d);
            }
            else
            {
                //Clears the current score board and list the new one
                listAllUsers.Items.Clear();

                for (int i = 0; i < Globals.Players.Names.Count; i++)
                {
                    listAllUsers.Items.Add(new ListViewItem(new[] { Globals.Players.Names[i], Globals.Players.Scores[i] }));
                }

            }
        }