Implement multi-threading import of ROM files.

This commit is contained in:
2025-07-23 03:23:57 +01:00
parent 7e009c7d66
commit 38cc8da72f
6 changed files with 909 additions and 596 deletions

View File

@@ -171,17 +171,14 @@ public class MainWindowViewModel : ViewModelBase
async Task ExecuteImportRomFolderCommandAsync()
{
IReadOnlyList<IStorageFolder> result =
await _view.StorageProvider.OpenFolderPickerAsync(new FolderPickerOpenOptions
{
Title = Localization.ImportRomsFolderDialogTitle
});
var dialog = new ImportRomFolder();
if(result.Count < 1) return;
var viewModel = new ImportRomFolderViewModel
{
View = dialog
};
var dialog = new ImportRomFolder();
var importRomFolderViewModel = new ImportRomFolderViewModel(dialog, result[0].Path.LocalPath);
dialog.DataContext = importRomFolderViewModel;
dialog.DataContext = viewModel;
_ = dialog.ShowDialog(_view);
}