private void OnLocationSelected(LocationSelectedEvent obj) { if (IsActive) { RoutePoint addedRoutePoint = _aircraftService.AddRoutePointToAircraft(_aircraft, obj.Location); PropertyChangedEventManager.AddListener(addedRoutePoint, this, nameof(RoutePoint.IsSelected)); _eventAggregator.GetEvent <PubSubEvent <RoutePointAddedEvent> >().Publish(new RoutePointAddedEvent(_aircraft.Id, addedRoutePoint)); } }
private void OnMapLocationChanged(LocationSelectedEvent obj) { if (IsInStartSelectionMode) { StartLocation = new LogbookLocation(DateTime.MinValue, obj.Location.Latitude, obj.Location.Longitude); IsInStartSelectionMode = false; } if (IsInEndSelectionMode) { EndLocation = new LogbookLocation(DateTime.MaxValue, obj.Location.Latitude, obj.Location.Longitude); IsInEndSelectionMode = false; } }