예제 #1
0
 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));
     }
 }
예제 #2
0
        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;
            }
        }