Beispiel #1
0
 private void PlanFound(MessageTypes.PlanFoundMessage planFoundMessage)
 {
     if (planFoundMessage.VisualState == MessageTypes.VisualStateType.Narrow)
     {
         NavigationService.NavigateAsync(typeof(TripResultPage));
     }
 }
Beispiel #2
0
        private async void PlanFound(MessageTypes.PlanFoundMessage _)
        {
            if (!BootStrapper.Current.SessionState.ContainsKey(NavParamKeys.PlanResults))
            {
                return;
            }

            var foundPlan = BootStrapper.Current.SessionState[NavParamKeys.PlanResults] as TripPlan;

            BootStrapper.Current.SessionState.Remove(NavParamKeys.PlanResults);
            if (foundPlan?.PlanItineraries == null)
            {
                return;
            }
            TripResults.Clear();
            FromName = foundPlan.StartingPlaceName ?? AppResources.TripPlanStrip_StartingPlaceDefault;
            ToName   = foundPlan.EndingPlaceName ?? AppResources.TripPlanStrip_EndPlaceDefault;

            //----todo: leaking abstraction here, see if we can move this to the view
            // Give the control enough time to animate back from the DetailedState,
            // so that when the TripPlanStrip does it's second render pass, it gets accurate values.
            if (IsInDetailedState)
            {
                GoBackToTripList();
                await Task.Delay(450);
            }
            //----end todo
            foreach (TripItinerary itinerary in foundPlan.PlanItineraries)
            {
                TripResults.Add(itinerary);
            }
        }
Beispiel #3
0
        private void PlanFound(MessageTypes.PlanFoundMessage obj)
        {
            if (!BootStrapper.Current.SessionState.ContainsKey(NavParamKeys.PlanResults))
            {
                return;
            }

            if (WideHub != null)
            {
                TripResultTripResultHubSection.Visibility = Visibility.Visible;
                if (WideHub == null || WideHub.Sections.Count < 2)
                {
                    return;
                }
                WideHub.ScrollToSection(WideHub.Sections[1]);
            }
        }