/// <summary> /// Handles the position changed. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position changed event arguments.</param> private void OnPositionChanged(object sender, PositionEventArgs e) { if (this.engine != null && e != null && e.Position != null) { System.Threading.Tasks.Task.Run(() => this.engine.RefreshLocation(e.Position.Latitude, e.Position.Longitude, (double)(e.Position.Altitude ?? double.NaN), (double)(e.Position.Accuracy ?? double.NaN))); } }
/// <summary> /// Handles the position changed event. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position changed event arguments.</param> private void OnHeadingChanged(object sender, PositionEventArgs e) { Position = e.Position; MapViewModel.Position = e.Position; RefreshDirections(false); }
private void OnHeadingChanged (PositionEventArgs e) { var changed = HeadingChanged; if (changed != null) changed (this, e); }
/// <summary> /// Handles the position changed event. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position changed event arguments.</param> private void OnPositionChanged(object sender, PositionEventArgs e) { Position = e.Position; MapViewModel.Position = e.Position; RefreshDirections(true); }
/// <summary> /// Handles the event, when position changed. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position event args.</param> private void OnPositionChanged(object sender, PositionEventArgs e) { Position = e.Position; }
/// <summary> /// Handles the position changed event. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position event arguments.</param> private void HandleHeadingChanged(object sender, PositionEventArgs e) { if (this.activeObject == null) { return; } Position = e.Position; UpdateDirection(false); }
/// <summary> /// Handles the position changed event. /// </summary> /// <param name="sender">Sender of event.</param> /// <param name="e">Position changed event arguments.</param> private void OnPositionChanged(object sender, PositionEventArgs e) { mapViewModel.Position = e.Position; }
private void OnPositionChanged(object sender, PositionEventArgs e) { // Ignore anything that might come in afterwards if (!IsListening) return; lock (_positionSync) { _lastPosition = e.Position; EventHandler<PositionEventArgs> changed = PositionChanged; if (changed != null) changed(this, e); } }