protected override async void OnNavigatedTo(NavigationEventArgs e) { route = e.Parameter as Route.Route; RouteProgressIO.SaveRouteProgressToFile(route); BingMapsWrapper.ClearGeofences(); await GetUserLocation(); AddPointsOfInterest(); }
/// <summary> /// This method checks if there is an already existing saved route with progress from the user. /// </summary> /// <param name="rootFrame">The frame to be used to navigate to the next page</param> private async void ApplicationStartRouteCheck(Frame rootFrame) { Route.Route existing = null; if (await RouteProgressIO.CheckIfLastSavedRouteExists()) { existing = await RouteProgressIO.LoadLastSavedRouteFromFile(); } if (existing != null) { rootFrame.Navigate(typeof(MapPage), existing); } else { rootFrame.Navigate(typeof(RouteSelectionPage), null); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { _selectedRoute = e.Parameter as Route.Route; }