diff --git a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs index 52c1a49dd..1117970ab 100644 --- a/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs +++ b/Aaru.Gui/ViewModels/Windows/ImageConvertViewModel.cs @@ -457,7 +457,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase return; } - Dictionary parsedOptions = new(); + Dictionary parsedOptions = []; /* TODO: if(grpOptions.Content is StackLayout stkImageOptions) @@ -868,11 +868,11 @@ public sealed partial class ImageConvertViewModel : ViewModelBase Progress2Value = Progress2MaxValue; }); - Dictionary isrcs = new(); - Dictionary trackFlags = new(); + Dictionary isrcs = []; + Dictionary trackFlags = []; string mcn = null; HashSet subchannelExtents = []; - Dictionary smallestPregapLbaPerTrack = new(); + Dictionary smallestPregapLbaPerTrack = []; foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc) .Order()) @@ -1800,13 +1800,13 @@ public sealed partial class ImageConvertViewModel : ViewModelBase IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions { Title = UI.Dialog_Choose_destination_file, - FileTypeChoices = new List - { - new(SelectedPlugin.Plugin.Name) + FileTypeChoices = + [ + new FilePickerFileType(SelectedPlugin.Plugin.Name) { Patterns = SelectedPlugin.Plugin.KnownExtensions.ToList() } - } + ] }); if(result is null) @@ -1863,12 +1863,9 @@ public sealed partial class ImageConvertViewModel : ViewModelBase IReadOnlyList result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions { - Title = UI.Dialog_Choose_existing_metadata_sidecar, - AllowMultiple = false, - FileTypeFilter = new List - { - FilePickerFileTypes.AaruMetadata - } + Title = UI.Dialog_Choose_existing_metadata_sidecar, + AllowMultiple = false, + FileTypeFilter = [FilePickerFileTypes.AaruMetadata] }); if(result.Count != 1) return; @@ -1907,12 +1904,9 @@ public sealed partial class ImageConvertViewModel : ViewModelBase IReadOnlyList result = await _view.StorageProvider.OpenFilePickerAsync(new FilePickerOpenOptions { - Title = UI.Dialog_Choose_existing_resume_file, - AllowMultiple = false, - FileTypeFilter = new List - { - FilePickerFileTypes.AaruResumeFile - } + Title = UI.Dialog_Choose_existing_resume_file, + AllowMultiple = false, + FileTypeFilter = [FilePickerFileTypes.AaruResumeFile] }); if(result.Count != 1) return;