private void setNewPlayerLocation(GPSLocation newLocation)
    {
        bool firstRun = false;

        if (currentPlayerLocation.Equals(GPSLocation.UNDEFINED))
        {
            firstRun = true;
        }

        if (!newLocation.Equals(currentPlayerLocation))
        {
            currentPlayerLocation = newLocation;
            if (LoggedInUser.GetLoggedInUser() != null)
            {
                if (firstRun)
                {
                    loadOwnedGlyphSpheres();
                }
            }
            else
            {
                statusPanel.showStatus(NO_USER_LOGGED_IN_STATUS);
            }
        }
    }
Example #2
0
        /// <summary>
        /// Is called, when an location changed event occures.
        /// </summary>
        /// <param name="sender">Sender.</param>
        /// <param name="e">Event arguments.</param>
        private void OnRefreshLocation(Object sender, WF.Player.Location.LocationChangedEventArgs e)
        {
            GPSLocation loc = Main.GPS.Location;

            if (engine != null && !loc.Equals(engine.Latitude, engine.Longitude, engine.Altitude, engine.Accuracy))
            {
                engine.RefreshLocation(loc.Latitude, loc.Longitude, loc.Altitude, loc.Accuracy);
            }
        }