Files
Futonizer/Views/SettingsWindow.xaml.cs
l4kr 05c496c10b Add overall progress, notifications, and UI polish
- Unify audio/subtitle selection: single-select, auto-default,
  cross-file propagation by exact name
- Show file size in queue, group divider and reordered columns in
  track table, drop accent highlight on row selection
- Add cumulative progress bar (files finished, MB copied) to the
  stripping window
- Add Windows toast notifications on stripping completion/cancel/error
- Restart the app after settings are changed; Cancel no longer
  clears the queue, only closes the window
- Add ConfigureAwait(false) throughout MkvService so concurrent
  strips don't starve the UI thread
- Hardcode scan/strip concurrency (10/5) instead of exposing it in
  Settings
2026-07-04 02:35:26 +02:00

62 lines
1.7 KiB
C#

using System.IO;
using System.Windows;
using Microsoft.Win32;
using Futonizer.Models;
using Wpf.Ui.Controls;
namespace Futonizer.Views;
public partial class SettingsWindow : FluentWindow
{
public AppSettings? Result { get; private set; }
public SettingsWindow(AppSettings current)
{
Wpf.Ui.Appearance.SystemThemeWatcher.Watch(this);
InitializeComponent();
MkvMergePathBox.Text = current.MkvMergePath;
OutputFolderBox.Text = current.OutputFolder;
}
private void BrowseMkvMergeButton_Click(object sender, RoutedEventArgs e)
{
var dlg = new OpenFileDialog
{
Title = "Locate mkvmerge.exe",
Filter = "mkvmerge.exe|mkvmerge.exe|Executable files (*.exe)|*.exe|All files (*.*)|*.*",
CheckFileExists = true,
};
if (dlg.ShowDialog(this) == true)
MkvMergePathBox.Text = dlg.FileName;
}
private void BrowseOutputFolderButton_Click(object sender, RoutedEventArgs e)
{
var dlg = new OpenFolderDialog { Title = "Select output folder" };
if (dlg.ShowDialog(this) == true)
OutputFolderBox.Text = dlg.FolderName;
}
private void SaveButton_Click(object sender, RoutedEventArgs e)
{
Result = new AppSettings
{
MkvMergePath = MkvMergePathBox.Text.Trim(),
OutputFolder = OutputFolderBox.Text.Trim(),
};
DialogResult = true;
}
private void CancelButton_Click(object sender, RoutedEventArgs e)
{
DialogResult = false;
}
private void ViewHistoryButton_Click(object sender, RoutedEventArgs e)
{
var win = new HistoryWindow { Owner = this };
win.ShowDialog();
}
}