mirror of
https://github.com/claunia/romrepomgr.git
synced 2025-12-16 19:24:51 +00:00
Use collection expression syntax.
This commit is contained in:
@@ -56,7 +56,7 @@ public sealed class AboutViewModel : ViewModelBase
|
||||
LicenseCommand = ReactiveCommand.Create(ExecuteLicenseCommand);
|
||||
CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
|
||||
|
||||
Assemblies = new ObservableCollection<AssemblyModel>();
|
||||
Assemblies = [];
|
||||
|
||||
// TODO: They do not load in time
|
||||
Task.Run(() =>
|
||||
|
||||
@@ -70,7 +70,7 @@ public sealed class ImportDatFolderViewModel : ViewModelBase
|
||||
FolderPath = folderPath;
|
||||
_allFilesChecked = false;
|
||||
_recursiveChecked = true;
|
||||
ImportResults = new ObservableCollection<ImportDatFolderItem>();
|
||||
ImportResults = [];
|
||||
CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
|
||||
StartCommand = ReactiveCommand.Create(ExecuteStartCommand);
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ public sealed class ImportRomFolderViewModel : ViewModelBase
|
||||
_removeFilesChecked = false;
|
||||
_knownOnlyChecked = true;
|
||||
_recurseArchivesChecked = Settings.Settings.UnArUsable;
|
||||
ImportResults = new ObservableCollection<ImportRomItem>();
|
||||
ImportResults = [];
|
||||
CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
|
||||
StartCommand = ReactiveCommand.Create(ExecuteStartCommand);
|
||||
IsReady = true;
|
||||
|
||||
@@ -162,21 +162,14 @@ public class MainWindowViewModel : ViewModelBase
|
||||
|
||||
dlgOpen.Filters.Add(new FileDialogFilter
|
||||
{
|
||||
Extensions = new List<string>
|
||||
{
|
||||
"dat",
|
||||
"xml"
|
||||
},
|
||||
Name = Localization.DatFilesDialogLabel
|
||||
Extensions = ["dat", "xml"],
|
||||
Name = Localization.DatFilesDialogLabel
|
||||
});
|
||||
|
||||
dlgOpen.Filters.Add(new FileDialogFilter
|
||||
{
|
||||
Extensions = new List<string>
|
||||
{
|
||||
"*"
|
||||
},
|
||||
Name = Localization.AllFilesDialogLabel
|
||||
Extensions = ["*"],
|
||||
Name = Localization.AllFilesDialogLabel
|
||||
});
|
||||
|
||||
string[] result = await dlgOpen.ShowAsync(_view);
|
||||
|
||||
@@ -57,7 +57,7 @@ public sealed class UpdateStatsViewModel : ViewModelBase
|
||||
CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
|
||||
IndeterminateProgress = true;
|
||||
ProgressVisible = false;
|
||||
RomSets = new ObservableCollection<RomSetModel>();
|
||||
RomSets = [];
|
||||
}
|
||||
|
||||
public string Title => Localization.UpdateStatsTitle;
|
||||
|
||||
Reference in New Issue
Block a user