Add queued FFmpeg conversion and finish splitting the window from the host.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
41
src/Explorer.App/ConvertWindow.xaml.cs
Normal file
41
src/Explorer.App/ConvertWindow.xaml.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System.Windows;
|
||||
using Explorer.Presentation.ViewModels;
|
||||
|
||||
namespace Explorer.App;
|
||||
|
||||
public partial class ConvertWindow : Window
|
||||
{
|
||||
public ConvertWindow(ConvertViewModel vm)
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = vm;
|
||||
vm.CloseRequested += (_, _) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
DialogResult = true;
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
// not shown as a dialog
|
||||
}
|
||||
|
||||
Close();
|
||||
};
|
||||
}
|
||||
|
||||
private void OnBrowseDest(object sender, RoutedEventArgs e)
|
||||
{
|
||||
var picker = new Microsoft.Win32.OpenFolderDialog
|
||||
{
|
||||
Title = "Convert to",
|
||||
Multiselect = false
|
||||
};
|
||||
if (picker.ShowDialog(this) == true
|
||||
&& !string.IsNullOrWhiteSpace(picker.FolderName)
|
||||
&& DataContext is ConvertViewModel vm)
|
||||
{
|
||||
vm.DestPath = picker.FolderName;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user