예제 #1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     if (e.Parameter is EditedFileUploadModel edited)
     {
         _model = edited;
     }
 }
예제 #2
0
        private async void DoCleanup()
        {
            try
            {
                var window = CoreWindow.GetForCurrentThread();
                window.KeyUp -= OnWindowKeyUp;

                mediaElement.Source = null;
                _mediaStreamSource  = null;
                _playTimer?.Stop();
                _model      = null;
                _renderTask = null;
                _tempFile   = null;

                if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
                {
                    DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
                    await StatusBar.GetForCurrentView().ShowAsync();
                }
                else
                {
                    DisplayInformation.AutoRotationPreferences = DisplayOrientations.None;
                }
            }
            catch (Exception ex)
            {
                Logger.LogError(ex);
            }

            GC.Collect();
        }
예제 #3
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            var bigModel = DataContext as ChannelViewModel;

            var model    = (sender as FrameworkElement).DataContext as FileUploadModel;
            var newModel = new EditedFileUploadModel(model)
            {
                Parent = this
            };

            bigModel.FileUploads.Remove(model);
            bigModel.FileUploads.Add(newModel);

            this.FindParent <DiscordPage>().OpenCustomPane(typeof(VideoEditor), newModel);
        }
예제 #4
0
        private void EditButton_Click(object sender, RoutedEventArgs e)
        {
            var bigModel = DataContext as ChannelViewModel;

            var model    = (sender as FrameworkElement).DataContext as FileUploadModel;
            var newModel = new EditedFileUploadModel(model)
            {
                Parent = this
            };

            bigModel.FileUploads.Remove(model);
            bigModel.FileUploads.Add(newModel);

            OverlayService.GetForCurrentView().ShowOverlay <VideoEditor>(newModel);
        }
예제 #5
0
        private async void Close()
        {
            this.FindParent <DiscordPage>().CloseCustomPane();
            mediaElement.Source = null;
            _mediaStreamSource  = null;
            _playTimer?.Stop();
            _model      = null;
            _renderTask = null;
            _tempFile   = null;

            if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
                await StatusBar.GetForCurrentView().ShowAsync();
            }

            DisplayInformation.AutoRotationPreferences = DisplayOrientations.None;

            GC.Collect();
        }
예제 #6
0
        private async void Close()
        {
            OverlayService.GetForCurrentView().CloseOverlay();

            mediaElement.Source = null;
            _mediaStreamSource  = null;
            _playTimer?.Stop();
            _model      = null;
            _renderTask = null;
            _tempFile   = null;

            if (ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
            {
                DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait;
                await StatusBar.GetForCurrentView().ShowAsync();
            }
            else
            {
                DisplayInformation.AutoRotationPreferences = DisplayOrientations.None;
            }

            GC.Collect();
        }