in Tools/Cam360/MainPage.xaml.cs [793:815]
private async Task StopVideoRecordingAsync()
{
try
{
await _mediaCapture.StopRecordAsync();
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => PhotoButton.IsEnabled = false);
if (_lowLagPhotoCapture != null)
{
await _lowLagPhotoCapture.FinishAsync();
_lowLagPhotoCapture = null;
}
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => PhotoButton.IsEnabled = true);
}
catch (Exception ex)
{
string errorMessage = string.Format("StopVideoRecording did not complete: {0}", ex.Message);
Debug.Write(errorMessage);
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
{
await new MessageDialog(errorMessage).ShowAsync();
});
}
}