Skip to content

Commit

Permalink
CHanging the Record button image and putting the end marker earlier t…
Browse files Browse the repository at this point in the history
…o address Azure-Samples#507
  • Loading branch information
VaijanathB committed Apr 25, 2016
1 parent f9cc415 commit ec8c775
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,22 +267,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 ec8c775

Please sign in to comment.