/// <summary> /// Afficher la boîte de dialogue d'export de décomposition vidéo. /// </summary> /// <param name="videos">Les vidéos que l'utilisateur peut sélectionner.</param> /// <returns> /// Le résultat. /// </returns> public ExportVideoDecompositionResult ExportVideoDecomposition(Models.Video[] videos) { var dialog = new ExportDialog("(*.ksv)|*.ksv") { Owner = GetCurrentActiveWindow(), }; dialog.VideoPickerVisibility = Visibility.Visible; dialog.videoPickerCB.ItemsSource = videos; dialog.videoPickerCB.DisplayMemberPath = "Name"; dialog.videoPickerCB.SelectedIndex = 0; dialog.BrowseWhenOpened = true; dialog.OpenWhenCreatedCB.Visibility = Visibility.Collapsed; dialog.VideoFolderVisibility = Visibility.Collapsed; dialog.VideoPickerTBlockText = LocalizationManager.GetString("ExportDialog_Video"); dialog.ShowDialog(); if (dialog.Accepts) { return new ExportVideoDecompositionResult() { Filename = dialog.Filename, VideoId = ((Models.Video)dialog.videoPickerCB.SelectedItem).VideoId, } } ; else { return(null); } }
/// <summary> /// Afficher la boîte de dialogue d'import de décomposition vidéo. /// </summary> /// <returns>Les paramètres de l'importation.</returns> public ImportWithVideoFolderResult ImportVideoDecomposition() { var dialog = new ExportDialog("(*.ksv)|*.ksv") { Owner = GetCurrentActiveWindow(), }; dialog.OpenWhenCreatedCB.Visibility = Visibility.Collapsed; dialog.UsedToOpen = true; dialog.BrowseWhenOpened = true; dialog.ShowDialog(); return(new ImportWithVideoFolderResult() { Accepts = dialog.Accepts, Filename = dialog.Filename, VideosFolder = dialog.VideoFolder }); }