Example #1
0
        private async void OnCompleted(IAsyncActionWithProgress <double> info, AsyncStatus status)
        {
            Analytics.TrackEvent("VideoEditor_ExportFinished");
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                if (status == AsyncStatus.Canceled)
                {
                    CloseProcessingOverlay.Begin();
                    return;
                }

                if (status != AsyncStatus.Completed)
                {
                    progressText.Visibility  = Visibility.Collapsed;
                    completedText.Text       = "\xE711";
                    completedText.Visibility = Visibility.Visible;
                }
                else
                {
                    progressText.Visibility  = Visibility.Collapsed;
                    completedText.Text       = "\xE8FB";
                    completedText.Visibility = Visibility.Visible;
                    _succeeded = true;
                }

                CloseProcessingOverlay.Begin();
            });

            _tempStream.Dispose();
            _tempStream = null;
            _renderTask = null;
        }
Example #2
0
        private async void OnCompleted(IAsyncOperationWithProgress <TranscodeFailureReason, double> info, AsyncStatus status)
        {
            Analytics.TrackEvent("VideoEditor_ExportFinished");
            await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
            {
                try
                {
                    var results = info.GetResults();

                    if (status == AsyncStatus.Canceled)
                    {
                        return;
                    }

                    if (results != TranscodeFailureReason.None || status != AsyncStatus.Completed)
                    {
                        progressText.Visibility  = Visibility.Collapsed;
                        completedText.Text       = "\xE711";
                        completedText.Visibility = Visibility.Visible;
                    }
                    else
                    {
                        progressText.Visibility  = Visibility.Collapsed;
                        completedText.Text       = "\xE8FB";
                        completedText.Visibility = Visibility.Visible;
                        _succeeded = true;
                    }
                }
                catch
                {
                    progressText.Visibility  = Visibility.Collapsed;
                    completedText.Text       = "\xE711";
                    completedText.Visibility = Visibility.Visible;
                }
                finally
                {
                    CloseProcessingOverlay.Begin();
                }
            });

            _renderTask = null;
        }