diff --git a/RomRepoMgr/App.xaml b/RomRepoMgr/App.xaml
index 38dae85..804b1f0 100644
--- a/RomRepoMgr/App.xaml
+++ b/RomRepoMgr/App.xaml
@@ -6,18 +6,16 @@
-
-
-
+
+ Click="OnAboutClicked" />
+ Click="OnPreferencesClicked" />
+ Click="OnQuitClicked" />
\ No newline at end of file
diff --git a/RomRepoMgr/Program.cs b/RomRepoMgr/Program.cs
index d2cae93..1bfd18b 100644
--- a/RomRepoMgr/Program.cs
+++ b/RomRepoMgr/Program.cs
@@ -24,6 +24,7 @@
*******************************************************************************/
using Avalonia;
+using Avalonia.Logging;
using Avalonia.ReactiveUI;
namespace RomRepoMgr;
@@ -36,6 +37,8 @@ internal class Program
public static void Main(string[] args) => BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
// Avalonia configuration, don't remove; also used by visual designer.
- public static AppBuilder BuildAvaloniaApp() =>
- AppBuilder.Configure().UsePlatformDetect().LogToDebug().UseReactiveUI();
+ public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure()
+ .UsePlatformDetect()
+ .LogToTrace(LogEventLevel.Debug)
+ .UseReactiveUI();
}
\ No newline at end of file
diff --git a/RomRepoMgr/RomRepoMgr.csproj b/RomRepoMgr/RomRepoMgr.csproj
index 35da12b..fecfebf 100644
--- a/RomRepoMgr/RomRepoMgr.csproj
+++ b/RomRepoMgr/RomRepoMgr.csproj
@@ -19,13 +19,14 @@
-
-
-
-
-
+
+
+
+
+
+
+
-
diff --git a/RomRepoMgr/ViewLocator.cs b/RomRepoMgr/ViewLocator.cs
index cc53e0e..e986aee 100644
--- a/RomRepoMgr/ViewLocator.cs
+++ b/RomRepoMgr/ViewLocator.cs
@@ -12,7 +12,7 @@ public class ViewLocator : IDataTemplate
{
public bool SupportsRecycling => false;
- public IControl Build(object data)
+ public Control Build(object data)
{
string name = data.GetType().FullName?.Replace("ViewModel", "View");
Type type = name is null ? null : Type.GetType(name);
diff --git a/RomRepoMgr/ViewModels/AboutViewModel.cs b/RomRepoMgr/ViewModels/AboutViewModel.cs
index 43bea88..4a0bade 100644
--- a/RomRepoMgr/ViewModels/AboutViewModel.cs
+++ b/RomRepoMgr/ViewModels/AboutViewModel.cs
@@ -31,7 +31,7 @@ using System.Reactive;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
-using JetBrains.Annotations;
+using Avalonia.Threading;
using ReactiveUI;
using RomRepoMgr.Core.Models;
using RomRepoMgr.Resources;
@@ -71,45 +71,35 @@ public sealed class AboutViewModel : ViewModelBase
if(name is null || version is null) continue;
- Assemblies.Add(new AssemblyModel
+ Dispatcher.UIThread.Post(() =>
{
- Name = name,
- Version = version
+ Assemblies.Add(new AssemblyModel
+ {
+ Name = name,
+ Version = version
+ });
});
}
});
}
- [NotNull]
- public string AboutLabel => Localization.AboutLabel;
- [NotNull]
- public string LibrariesLabel => Localization.LibrariesLabel;
- [NotNull]
- public string AuthorsLabel => Localization.AuthorsLabel;
- [NotNull]
- public string Title => Localization.AboutTitle;
- [NotNull]
- public string SoftwareName => "RomRepoMgr";
- [NotNull]
- public string SuiteName => "ROM Repository Manager";
- [NotNull]
- public string Copyright => "© 2020-2024 Natalia Portillo";
- [NotNull]
- public string Website => "https://www.claunia.com";
- [NotNull]
- public string License => Localization.LicenseLabel;
- [NotNull]
- public string CloseLabel => Localization.CloseLabel;
- [NotNull]
- public string AssembliesLibraryText => Localization.AssembliesLibraryText;
- [NotNull]
- public string AssembliesVersionText => Localization.AssembliesVersionText;
- [NotNull]
- public string Authors => Localization.AuthorsText;
- public ReactiveCommand WebsiteCommand { get; }
- public ReactiveCommand LicenseCommand { get; }
- public ReactiveCommand CloseCommand { get; }
- public ObservableCollection Assemblies { get; }
+ public string AboutLabel => Localization.AboutLabel;
+ public string LibrariesLabel => Localization.LibrariesLabel;
+ public string AuthorsLabel => Localization.AuthorsLabel;
+ public string Title => Localization.AboutTitle;
+ public string SoftwareName => "RomRepoMgr";
+ public string SuiteName => "ROM Repository Manager";
+ public string Copyright => "© 2020-2024 Natalia Portillo";
+ public string Website => "https://www.claunia.com";
+ public string License => Localization.LicenseLabel;
+ public string CloseLabel => Localization.CloseLabel;
+ public string AssembliesLibraryText => Localization.AssembliesLibraryText;
+ public string AssembliesVersionText => Localization.AssembliesVersionText;
+ public string Authors => Localization.AuthorsText;
+ public ReactiveCommand WebsiteCommand { get; }
+ public ReactiveCommand LicenseCommand { get; }
+ public ReactiveCommand CloseCommand { get; }
+ public ObservableCollection Assemblies { get; }
public string VersionText
{
diff --git a/RomRepoMgr/ViewModels/ExportDatViewModel.cs b/RomRepoMgr/ViewModels/ExportDatViewModel.cs
index fc1b397..d138888 100644
--- a/RomRepoMgr/ViewModels/ExportDatViewModel.cs
+++ b/RomRepoMgr/ViewModels/ExportDatViewModel.cs
@@ -27,7 +27,6 @@ using System.IO;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core;
using RomRepoMgr.Core.EventArgs;
@@ -63,7 +62,6 @@ public sealed class ExportDatViewModel : ViewModelBase
_worker.FailedWithText += OnWorkerOnFailedWithText;
}
- [NotNull]
public string Title => Localization.ExportDatTitle;
public string StatusMessage
diff --git a/RomRepoMgr/ViewModels/ExportRomsViewModel.cs b/RomRepoMgr/ViewModels/ExportRomsViewModel.cs
index 007a594..46ae497 100644
--- a/RomRepoMgr/ViewModels/ExportRomsViewModel.cs
+++ b/RomRepoMgr/ViewModels/ExportRomsViewModel.cs
@@ -27,7 +27,6 @@ using System;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core.EventArgs;
using RomRepoMgr.Core.Workers;
@@ -69,8 +68,7 @@ public sealed class ExportRomsViewModel : ViewModelBase
CanClose = false;
}
- [NotNull]
- public string PathLabel => Localization.PathLabel;
+ public string PathLabel => Localization.PathLabel;
public string FolderPath { get; }
public bool ProgressVisible
@@ -181,9 +179,7 @@ public sealed class ExportRomsViewModel : ViewModelBase
set => this.RaiseAndSetIfChanged(ref _progress3IsIndeterminate, value);
}
- [NotNull]
- public string Title => Localization.ExportRomsTitle;
- [NotNull]
+ public string Title => Localization.ExportRomsTitle;
public string CloseLabel => Localization.CloseLabel;
public bool CanClose
diff --git a/RomRepoMgr/ViewModels/ImportDatFolderViewModel.cs b/RomRepoMgr/ViewModels/ImportDatFolderViewModel.cs
index 4959bef..1735d65 100644
--- a/RomRepoMgr/ViewModels/ImportDatFolderViewModel.cs
+++ b/RomRepoMgr/ViewModels/ImportDatFolderViewModel.cs
@@ -30,7 +30,6 @@ using System.Linq;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core.EventArgs;
using RomRepoMgr.Core.Workers;
@@ -192,7 +191,6 @@ public sealed class ImportDatFolderViewModel : ViewModelBase
set => this.RaiseAndSetIfChanged(ref _category, value);
}
- [NotNull]
public string Title => Localization.ImportDatFolderTitle;
public ObservableCollection ImportResults { get; }
diff --git a/RomRepoMgr/ViewModels/ImportDatViewModel.cs b/RomRepoMgr/ViewModels/ImportDatViewModel.cs
index bbf8190..2e23769 100644
--- a/RomRepoMgr/ViewModels/ImportDatViewModel.cs
+++ b/RomRepoMgr/ViewModels/ImportDatViewModel.cs
@@ -27,7 +27,6 @@ using System;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core.EventArgs;
using RomRepoMgr.Core.Workers;
@@ -66,7 +65,6 @@ public sealed class ImportDatViewModel : ViewModelBase
_worker.WorkFinished += OnWorkerOnWorkFinished;
}
- [NotNull]
public string Title => Localization.ImportDatTitle;
public string StatusMessage
diff --git a/RomRepoMgr/ViewModels/ImportRomFolderViewModel.cs b/RomRepoMgr/ViewModels/ImportRomFolderViewModel.cs
index 1153e51..5174fad 100644
--- a/RomRepoMgr/ViewModels/ImportRomFolderViewModel.cs
+++ b/RomRepoMgr/ViewModels/ImportRomFolderViewModel.cs
@@ -28,7 +28,6 @@ using System.Collections.ObjectModel;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core.EventArgs;
using RomRepoMgr.Core.Models;
@@ -199,7 +198,6 @@ public sealed class ImportRomFolderViewModel : ViewModelBase
set => this.RaiseAndSetIfChanged(ref _isImporting, value);
}
- [NotNull]
public string Title => Localization.ImportRomFolderTitle;
public ObservableCollection ImportResults { get; }
diff --git a/RomRepoMgr/ViewModels/RemoveDatViewModel.cs b/RomRepoMgr/ViewModels/RemoveDatViewModel.cs
index 770bbef..9a68eb0 100644
--- a/RomRepoMgr/ViewModels/RemoveDatViewModel.cs
+++ b/RomRepoMgr/ViewModels/RemoveDatViewModel.cs
@@ -26,7 +26,6 @@
using System.IO;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using ReactiveUI;
using RomRepoMgr.Core;
using RomRepoMgr.Database;
@@ -48,7 +47,6 @@ public sealed class RemoveDatViewModel : ViewModelBase
_romSetId = romSetId;
}
- [NotNull]
public string Title => Localization.RemoveDatTitle;
public string StatusMessage
diff --git a/RomRepoMgr/ViewModels/SettingsViewModel.cs b/RomRepoMgr/ViewModels/SettingsViewModel.cs
index ba7439c..a595f8d 100644
--- a/RomRepoMgr/ViewModels/SettingsViewModel.cs
+++ b/RomRepoMgr/ViewModels/SettingsViewModel.cs
@@ -29,7 +29,6 @@ using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Controls;
using Avalonia.Threading;
-using JetBrains.Annotations;
using MessageBox.Avalonia;
using MessageBox.Avalonia.Enums;
using Microsoft.EntityFrameworkCore;
@@ -150,7 +149,7 @@ public sealed class SettingsViewModel : ViewModelBase
Task.Run(() => worker.CheckUnAr(UnArPath));
}
- async void CheckUnArFailed(object sender, [NotNull] ErrorEventArgs args)
+ async void CheckUnArFailed(object sender, ErrorEventArgs args)
{
UnArVersion = "";
UnArPath = "";
diff --git a/RomRepoMgr/ViewModels/UpdateStatsViewModel.cs b/RomRepoMgr/ViewModels/UpdateStatsViewModel.cs
index e08c73a..5246262 100644
--- a/RomRepoMgr/ViewModels/UpdateStatsViewModel.cs
+++ b/RomRepoMgr/ViewModels/UpdateStatsViewModel.cs
@@ -29,7 +29,6 @@ using System.Linq;
using System.Reactive;
using System.Threading.Tasks;
using Avalonia.Threading;
-using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore;
using ReactiveUI;
using RomRepoMgr.Core.Models;
@@ -61,8 +60,7 @@ public sealed class UpdateStatsViewModel : ViewModelBase
RomSets = new ObservableCollection();
}
- [NotNull]
- public string Title => Localization.UpdateStatsTitle;
+ public string Title => Localization.UpdateStatsTitle;
public string RomSetNameLabel => Localization.RomSetNameLabel;
public string RomSetVersionLabel => Localization.RomSetVersionLabel;
public string RomSetAuthorLabel => Localization.RomSetAuthorLabel;
diff --git a/RomRepoMgr/Views/About.xaml b/RomRepoMgr/Views/About.xaml
index 5690516..27fd9e3 100644
--- a/RomRepoMgr/Views/About.xaml
+++ b/RomRepoMgr/Views/About.xaml
@@ -120,7 +120,7 @@
-
diff --git a/RomRepoMgr/Views/ImportRomFolder.xaml b/RomRepoMgr/Views/ImportRomFolder.xaml
index 971eac1..1d572da 100644
--- a/RomRepoMgr/Views/ImportRomFolder.xaml
+++ b/RomRepoMgr/Views/ImportRomFolder.xaml
@@ -98,7 +98,7 @@
IsIndeterminate="{Binding Progress2IsIndeterminate}" />
diff --git a/RomRepoMgr/Views/MainWindow.xaml b/RomRepoMgr/Views/MainWindow.xaml
index 7c6ea0f..af3df42 100644
--- a/RomRepoMgr/Views/MainWindow.xaml
+++ b/RomRepoMgr/Views/MainWindow.xaml
@@ -78,7 +78,7 @@
-