Skip to content

Commit

Permalink
Merge pull request Azure-Samples#515 from Azure-Samples/VJTest
Browse files Browse the repository at this point in the history
UWP fixes for github issues
  • Loading branch information
VaijanathB committed Apr 26, 2016
2 parents bff65d0 + bfacc6d commit 925de6d
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private void SystemNavigationManager_BackRequested(object sender, BackRequestedE
private bool TryGoBack()
{
bool navigated = false;
if (Frame.CanGoBack)
if (Frame.CanGoBack && !ViewModel.IsRecording)
{
Frame.GoBack();
navigated = true;
Expand Down Expand Up @@ -281,22 +281,22 @@ private async void StartRecordBtn_Click(object sender, RoutedEventArgs e)
{
// Need to update Map UI before we start saving. So that the entire trip is visible.
UpdateMap_PositionChanged(basicGeoposition);

// Changing the record button icon and andding end marker earlier to notify user about the stop process.
recordButtonImage = new BitmapImage(new Uri("ms-appx:///Assets/StartRecord.png", UriKind.Absolute));
OnPropertyChanged(nameof(RecordButtonImage));
AddEndMarker(basicGeoposition);

if (!await ViewModel.StopRecordingTrip())
{
recordButtonIsBusy = false;
return;
}

// Need to add the end marker only when we are able to stop the trip.
AddEndMarker(basicGeoposition);
await ViewModel.SaveRecordingTripAsync();

recordButtonImage = new BitmapImage(new Uri("ms-appx:///Assets/StartRecord.png", UriKind.Absolute));
OnPropertyChanged(nameof(RecordButtonImage));
var recordedTripSummary = ViewModel.TripSummary;
await ViewModel.SaveRecordingTripAsync();
// Launch Trip Summary Page.

Frame.Navigate(typeof(TripSummaryView), recordedTripSummary);
}
else
Expand Down

0 comments on commit 925de6d

Please sign in to comment.