mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
[GUI] Replace Dictionary initializations with array literals in ImageConvertViewModel
This commit is contained in:
@@ -457,7 +457,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dictionary<string, string> parsedOptions = new();
|
Dictionary<string, string> parsedOptions = [];
|
||||||
|
|
||||||
/* TODO:
|
/* TODO:
|
||||||
if(grpOptions.Content is StackLayout stkImageOptions)
|
if(grpOptions.Content is StackLayout stkImageOptions)
|
||||||
@@ -868,11 +868,11 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
|||||||
Progress2Value = Progress2MaxValue;
|
Progress2Value = Progress2MaxValue;
|
||||||
});
|
});
|
||||||
|
|
||||||
Dictionary<byte, string> isrcs = new();
|
Dictionary<byte, string> isrcs = [];
|
||||||
Dictionary<byte, byte> trackFlags = new();
|
Dictionary<byte, byte> trackFlags = [];
|
||||||
string mcn = null;
|
string mcn = null;
|
||||||
HashSet<int> subchannelExtents = [];
|
HashSet<int> subchannelExtents = [];
|
||||||
Dictionary<byte, int> smallestPregapLbaPerTrack = new();
|
Dictionary<byte, int> smallestPregapLbaPerTrack = [];
|
||||||
|
|
||||||
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc)
|
foreach(SectorTagType tag in _inputFormat.Info.ReadableSectorTags.Where(t => t == SectorTagType.CdTrackIsrc)
|
||||||
.Order())
|
.Order())
|
||||||
@@ -1800,13 +1800,13 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
|||||||
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
|
||||||
{
|
{
|
||||||
Title = UI.Dialog_Choose_destination_file,
|
Title = UI.Dialog_Choose_destination_file,
|
||||||
FileTypeChoices = new List<FilePickerFileType>
|
FileTypeChoices =
|
||||||
{
|
[
|
||||||
new(SelectedPlugin.Plugin.Name)
|
new FilePickerFileType(SelectedPlugin.Plugin.Name)
|
||||||
{
|
{
|
||||||
Patterns = SelectedPlugin.Plugin.KnownExtensions.ToList()
|
Patterns = SelectedPlugin.Plugin.KnownExtensions.ToList()
|
||||||
}
|
}
|
||||||
}
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
if(result is null)
|
if(result is null)
|
||||||
@@ -1865,10 +1865,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
Title = UI.Dialog_Choose_existing_metadata_sidecar,
|
Title = UI.Dialog_Choose_existing_metadata_sidecar,
|
||||||
AllowMultiple = false,
|
AllowMultiple = false,
|
||||||
FileTypeFilter = new List<FilePickerFileType>
|
FileTypeFilter = [FilePickerFileTypes.AaruMetadata]
|
||||||
{
|
|
||||||
FilePickerFileTypes.AaruMetadata
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(result.Count != 1) return;
|
if(result.Count != 1) return;
|
||||||
@@ -1909,10 +1906,7 @@ public sealed partial class ImageConvertViewModel : ViewModelBase
|
|||||||
{
|
{
|
||||||
Title = UI.Dialog_Choose_existing_resume_file,
|
Title = UI.Dialog_Choose_existing_resume_file,
|
||||||
AllowMultiple = false,
|
AllowMultiple = false,
|
||||||
FileTypeFilter = new List<FilePickerFileType>
|
FileTypeFilter = [FilePickerFileTypes.AaruResumeFile]
|
||||||
{
|
|
||||||
FilePickerFileTypes.AaruResumeFile
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if(result.Count != 1) return;
|
if(result.Count != 1) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user