Exemplo n.º 1
0
        private void GetPlayerData(object stateObject)
        {
            mumbleLink.parse();
            player.parse(mumbleLink);

            if (player.mapID != 0 && player.mapID != map.currentID)
            {
                map.GetData(player.mapID);
            }

            // Update UI thread.
            try
            {
                Invoke(updateUIMethod);
            }
            catch (ObjectDisposedException)
            {
                // Absorb it.
            }

            timerGetPlayerData.Change(50, Timeout.Infinite); // Restart timer and call it once.
        }