private void GeoWatcher_StatusChanged(object sender, GeoPositionStatusChangedEventArgs e)
{
lock (_SyncRoot)
{
if (_IsDisposed)
{
return;
}
}
// Debug log.
LogDebug(String.Format("Location service status changed to {0}.", e.Status.ToString()));
switch (e.Status)
{
case GeoPositionStatus.Disabled:
break;
case GeoPositionStatus.Initializing:
break;
case GeoPositionStatus.NoData:
break;
case GeoPositionStatus.Ready:
// Refresh the position in the engine.
ProcessPosition(_GeoWatcher.Position);
break;
default:
throw new InvalidProgramException("Unexpected status of the Location Service.");
}
// Raises a property changed event.
RaisePropertyChanged("DeviceLocationStatus");
}