public virtual void OnLocationChanged(GeoLocationChangedEventArgs e) { EventHandler <GeoLocationChangedEventArgs> t = LocationChanged; if (t != null) { t(this, e); } }
protected void OnLocationChanged(GeoLocationChangedEventArgs e) { Utility.Trace("GeoLocationProvider.OnLocationChanged: " + e.Location.Coordinate.ToString()); EventHandler <GeoLocationChangedEventArgs> t = LocationChanged; if (t != null) { t(this, e); } }
private void OnInternalLocationChanged(object sender, GeoLocationChangedEventArgs e) { if (e.Location != null) { Utility.Trace("GeoLocationProvider.OnInternalLocationChanged: " + e.Location.Coordinate.ToString()); // // Only fire event when location change exceeds the movement threshold or the coordinate // is unknown, as in the case of a civic address only report. // if ((m_lastCoordinate == GeoCoordinate.Unknown) || (e.Location.Coordinate == GeoCoordinate.Unknown) || (e.Location.Coordinate.GetDistanceTo(m_lastCoordinate) >= m_threshold)) { m_lastCoordinate = e.Location.Coordinate; PostEvent(OnLocationChanged, new GeoLocationChangedEventArgs(e.Location)); OnPropertyChanged("Location"); } } }