diff --git a/Aaru.Gui/Aaru.Gui.csproj b/Aaru.Gui/Aaru.Gui.csproj
index 903e05def..0a746d70f 100644
--- a/Aaru.Gui/Aaru.Gui.csproj
+++ b/Aaru.Gui/Aaru.Gui.csproj
@@ -23,6 +23,7 @@
+
@@ -32,7 +33,6 @@
-
diff --git a/Aaru.Gui/App.xaml.cs b/Aaru.Gui/App.xaml.cs
index 1f9424ba4..1c115e0ab 100644
--- a/Aaru.Gui/App.xaml.cs
+++ b/Aaru.Gui/App.xaml.cs
@@ -91,7 +91,7 @@ public sealed class App : Application
})
return;
- mainWindowViewModel.ExecuteAboutCommand();
+ mainWindowViewModel.About();
}
void OnQuitClicked(object sender, EventArgs args)
@@ -105,7 +105,7 @@ public sealed class App : Application
})
return;
- mainWindowViewModel.ExecuteExitCommand();
+ mainWindowViewModel.Exit();
}
void OnPreferencesClicked(object sender, EventArgs args)
@@ -119,6 +119,6 @@ public sealed class App : Application
})
return;
- mainWindowViewModel.ExecuteSettingsCommand();
+ mainWindowViewModel.SettingsAsync();
}
}
\ No newline at end of file
diff --git a/Aaru.Gui/Main.cs b/Aaru.Gui/Main.cs
index fdc725e52..b5a4e6032 100644
--- a/Aaru.Gui/Main.cs
+++ b/Aaru.Gui/Main.cs
@@ -29,8 +29,6 @@
using System;
using System.Text;
using Avalonia;
-using Avalonia.Dialogs;
-using Avalonia.ReactiveUI;
using Sentry;
namespace Aaru.Gui;
@@ -78,6 +76,5 @@ public static class Main
}
// Avalonia configuration, don't remove; also used by visual designer.
- public static AppBuilder BuildAvaloniaApp() =>
- AppBuilder.Configure().UsePlatformDetect().UseReactiveUI().UseManagedSystemDialogs();
+ public static AppBuilder BuildAvaloniaApp() => AppBuilder.Configure().UsePlatformDetect();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs
index f51113346..5b35f3d29 100644
--- a/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/AboutViewModel.cs
@@ -34,22 +34,24 @@ using System;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;
-using System.Reactive;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
+using System.Windows.Input;
using Aaru.Gui.Models;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
namespace Aaru.Gui.ViewModels.Dialogs;
-public sealed class AboutViewModel : ViewModelBase
+public sealed partial class AboutViewModel : ViewModelBase
{
readonly About _view;
- string _versionText;
+ [ObservableProperty]
+ string _versionText;
public AboutViewModel(About view)
{
@@ -59,13 +61,13 @@ public sealed class AboutViewModel : ViewModelBase
(Attribute.GetCustomAttribute(typeof(App).Assembly, typeof(AssemblyInformationalVersionAttribute)) as
AssemblyInformationalVersionAttribute)?.InformationalVersion;
- WebsiteCommand = ReactiveCommand.Create(ExecuteWebsiteCommand);
- LicenseCommand = ReactiveCommand.Create(ExecuteLicenseCommand);
- CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
+ WebsiteCommand = new RelayCommand(OpenWebsite);
+ LicenseCommand = new AsyncRelayCommand(LicenseAsync);
+ CloseCommand = new RelayCommand(Close);
Assemblies = [];
- Task.Run(() =>
+ _ = Task.Run(() =>
{
foreach(Assembly assembly in AppDomain.CurrentDomain.GetAssemblies().OrderBy(a => a.FullName))
{
@@ -125,18 +127,12 @@ public sealed class AboutViewModel : ViewModelBase
[NotNull]
public string Authors => UI.Text_Authors;
- public ReactiveCommand WebsiteCommand { get; }
- public ReactiveCommand LicenseCommand { get; }
- public ReactiveCommand CloseCommand { get; }
+ public ICommand WebsiteCommand { get; }
+ public ICommand LicenseCommand { get; }
+ public ICommand CloseCommand { get; }
public ObservableCollection Assemblies { get; }
- public string VersionText
- {
- get => _versionText;
- set => this.RaiseAndSetIfChanged(ref _versionText, value);
- }
-
- static void ExecuteWebsiteCommand()
+ static void OpenWebsite()
{
var process = new Process
{
@@ -163,12 +159,13 @@ public sealed class AboutViewModel : ViewModelBase
process.Start();
}
- void ExecuteLicenseCommand()
+ Task LicenseAsync()
{
var dialog = new LicenseDialog();
dialog.DataContext = new LicenseViewModel(dialog);
- dialog.ShowDialog(_view);
+
+ return dialog.ShowDialog(_view);
}
- void ExecuteCloseCommand() => _view.Close();
+ void Close() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs
index f41e89a76..868d42009 100644
--- a/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/ConsoleViewModel.cs
@@ -34,17 +34,17 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
-using System.Reactive;
using System.Reflection;
using System.Threading.Tasks;
+using System.Windows.Input;
using Aaru.CommonTypes.Interop;
using Aaru.Localization;
using Aaru.Logging;
using Avalonia.Platform.Storage;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
using MsBox.Avalonia;
using MsBox.Avalonia.Enums;
-using ReactiveUI;
using Console = Aaru.Gui.Views.Dialogs.Console;
using PlatformID = Aaru.CommonTypes.Interop.PlatformID;
using Version = Aaru.CommonTypes.Interop.Version;
@@ -59,15 +59,15 @@ public sealed class ConsoleViewModel : ViewModelBase
public ConsoleViewModel(Console view)
{
_view = view;
- SaveCommand = ReactiveCommand.Create(ExecuteSaveCommand);
- ClearCommand = ReactiveCommand.Create(ExecuteClearCommand);
+ SaveCommand = new AsyncRelayCommand(SaveAsync);
+ ClearCommand = new RelayCommand(Clear);
}
[NotNull]
public string Title => UI.Title_Console;
- public ReactiveCommand ClearCommand { get; }
- public ReactiveCommand SaveCommand { get; }
+ public ICommand ClearCommand { get; }
+ public ICommand SaveCommand { get; }
public ObservableCollection Entries => ConsoleHandler.Entries;
[NotNull]
@@ -90,11 +90,11 @@ public sealed class ConsoleViewModel : ViewModelBase
set
{
ConsoleHandler.Debug = value;
- this.RaiseAndSetIfChanged(ref _debugChecked, value);
+ SetProperty(ref _debugChecked, value);
}
}
- async Task ExecuteSaveCommand()
+ async Task SaveAsync()
{
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
{
@@ -165,11 +165,11 @@ public sealed class ConsoleViewModel : ViewModelBase
Icon.Error)
.ShowWindowDialogAsync(_view);
- AaruLogging.Exception(exception, UI
- .Exception_0_trying_to_save_logfile_details_has_been_sent_to_console,
+ AaruLogging.Exception(exception,
+ UI.Exception_0_trying_to_save_logfile_details_has_been_sent_to_console,
exception.Message);
}
}
- static void ExecuteClearCommand() => ConsoleHandler.Entries.Clear();
+ static void Clear() => ConsoleHandler.Entries.Clear();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs
index df4402b34..736dab2ef 100644
--- a/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/EncodingsViewModel.cs
@@ -32,14 +32,14 @@
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using System.Text;
using System.Threading.Tasks;
+using System.Windows.Input;
using Aaru.Gui.Models;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
namespace Aaru.Gui.ViewModels.Dialogs;
@@ -51,9 +51,9 @@ public sealed class EncodingsViewModel : ViewModelBase
{
_view = view;
Encodings = [];
- CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
+ CloseCommand = new RelayCommand(Close);
- Task.Run(() =>
+ _ = Task.Run(() =>
{
var encodings = Encoding.GetEncodings()
.Select(info => new EncodingModel
@@ -83,8 +83,8 @@ public sealed class EncodingsViewModel : ViewModelBase
public string CodeLabel => UI.Title_Code_for_encoding;
public string NameLabel => UI.Title_Name;
- public ReactiveCommand CloseCommand { get; }
+ public ICommand CloseCommand { get; }
public ObservableCollection Encodings { get; }
- void ExecuteCloseCommand() => _view.Close();
+ void Close() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/LicenseViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/LicenseViewModel.cs
index 985ee81b3..ceac46e94 100644
--- a/Aaru.Gui/ViewModels/Dialogs/LicenseViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/LicenseViewModel.cs
@@ -31,12 +31,12 @@
// ****************************************************************************/
using System.IO;
-using System.Reactive;
using System.Reflection;
+using System.Windows.Input;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
namespace Aaru.Gui.ViewModels.Dialogs;
@@ -48,7 +48,7 @@ public sealed class LicenseViewModel : ViewModelBase
public LicenseViewModel(LicenseDialog view)
{
_view = view;
- CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
+ CloseCommand = new RelayCommand(Close);
// TODO: Localize
using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("Aaru.Gui.LICENSE");
@@ -66,8 +66,8 @@ public sealed class LicenseViewModel : ViewModelBase
[NotNull]
public string CloseLabel => UI.ButtonLabel_Close;
- public string LicenseText { get; }
- public ReactiveCommand CloseCommand { get; }
+ public string LicenseText { get; }
+ public ICommand CloseCommand { get; }
- void ExecuteCloseCommand() => _view.Close();
+ void Close() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs
index a73d10148..8908c1c9f 100644
--- a/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/PluginsViewModel.cs
@@ -31,15 +31,15 @@
// ****************************************************************************/
using System.Collections.ObjectModel;
-using System.Reactive;
using System.Reflection;
+using System.Windows.Input;
using Aaru.CommonTypes;
using Aaru.CommonTypes.Interfaces;
using Aaru.Gui.Models;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
namespace Aaru.Gui.ViewModels.Dialogs;
@@ -58,7 +58,7 @@ public sealed class PluginsViewModel : ViewModelBase
WritableImages = [];
FloppyImages = [];
WritableFloppyImages = [];
- CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
+ CloseCommand = new RelayCommand(Close);
// TODO: Takes too much time
foreach(IFilter filter in PluginRegister.Singleton.Filters.Values)
@@ -201,7 +201,7 @@ public sealed class PluginsViewModel : ViewModelBase
public string VersionLabel => UI.Title_Version;
public string AuthorLabel => UI.Title_Author;
- public ReactiveCommand CloseCommand { get; }
+ public ICommand CloseCommand { get; }
public ObservableCollection Filters { get; }
public ObservableCollection PartitionSchemes { get; }
public ObservableCollection Filesystems { get; }
@@ -211,5 +211,5 @@ public sealed class PluginsViewModel : ViewModelBase
public ObservableCollection FloppyImages { get; }
public ObservableCollection WritableFloppyImages { get; }
- void ExecuteCloseCommand() => _view.Close();
+ void Close() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs
index c23820e95..cb5877b63 100644
--- a/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/SettingsViewModel.cs
@@ -30,33 +30,49 @@
// Copyright © 2011-2025 Natalia Portillo
// ****************************************************************************/
-using System.Reactive;
+using System.Windows.Input;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
using Aaru.Settings;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
namespace Aaru.Gui.ViewModels.Dialogs;
-public sealed class SettingsViewModel : ViewModelBase
+public sealed partial class SettingsViewModel : ViewModelBase
{
readonly SettingsDialog _view;
- bool _commandStatsChecked;
- bool _deviceStatsChecked;
- bool _filesystemStatsChecked;
- bool _filterStatsChecked;
- bool _gdprVisible;
- bool _mediaImageStatsChecked;
- bool _mediaScanStatsChecked;
- bool _mediaStatsChecked;
- bool _partitionStatsChecked;
- bool _saveReportsGloballyChecked;
- bool _saveStatsChecked;
- bool _shareReportsChecked;
- bool _shareStatsChecked;
- int _tabControlSelectedIndex;
- bool _verifyStatsChecked;
+ [ObservableProperty]
+ bool _commandStatsChecked;
+ [ObservableProperty]
+ bool _deviceStatsChecked;
+ [ObservableProperty]
+ bool _filesystemStatsChecked;
+ [ObservableProperty]
+ bool _filterStatsChecked;
+ [ObservableProperty]
+ bool _gdprVisible;
+ [ObservableProperty]
+ bool _mediaImageStatsChecked;
+ [ObservableProperty]
+ bool _mediaScanStatsChecked;
+ [ObservableProperty]
+ bool _mediaStatsChecked;
+ [ObservableProperty]
+ bool _partitionStatsChecked;
+ [ObservableProperty]
+ bool _saveReportsGloballyChecked;
+ [ObservableProperty]
+ bool _saveStatsChecked;
+ [ObservableProperty]
+ bool _shareReportsChecked;
+ [ObservableProperty]
+ bool _shareStatsChecked;
+ [ObservableProperty]
+ int _tabControlSelectedIndex;
+ [ObservableProperty]
+ bool _verifyStatsChecked;
public SettingsViewModel(SettingsDialog view, bool gdprChange)
{
@@ -82,8 +98,8 @@ public sealed class SettingsViewModel : ViewModelBase
else
SaveStatsChecked = false;
- CancelCommand = ReactiveCommand.Create(ExecuteCancelCommand);
- SaveCommand = ReactiveCommand.Create(ExecuteSaveCommand);
+ CancelCommand = new RelayCommand(Cancel);
+ SaveCommand = new RelayCommand(Save);
if(!_gdprVisible) _tabControlSelectedIndex = 1;
}
@@ -164,100 +180,10 @@ public sealed class SettingsViewModel : ViewModelBase
[NotNull]
public string VerifyStatsText => UI.Gather_statistics_about_media_image_verifications_Q;
- public ReactiveCommand CancelCommand { get; }
- public ReactiveCommand SaveCommand { get; }
+ public ICommand CancelCommand { get; }
+ public ICommand SaveCommand { get; }
- public bool GdprVisible
- {
- get => _gdprVisible;
- set => this.RaiseAndSetIfChanged(ref _gdprVisible, value);
- }
-
- public bool SaveReportsGloballyChecked
- {
- get => _saveReportsGloballyChecked;
- set => this.RaiseAndSetIfChanged(ref _saveReportsGloballyChecked, value);
- }
-
- public bool ShareReportsChecked
- {
- get => _shareReportsChecked;
- set => this.RaiseAndSetIfChanged(ref _shareReportsChecked, value);
- }
-
- public bool SaveStatsChecked
- {
- get => _saveStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _saveStatsChecked, value);
- }
-
- public bool ShareStatsChecked
- {
- get => _shareStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _shareStatsChecked, value);
- }
-
- public bool CommandStatsChecked
- {
- get => _commandStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _commandStatsChecked, value);
- }
-
- public bool DeviceStatsChecked
- {
- get => _deviceStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _deviceStatsChecked, value);
- }
-
- public bool FilesystemStatsChecked
- {
- get => _filesystemStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _filesystemStatsChecked, value);
- }
-
- public bool FilterStatsChecked
- {
- get => _filterStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _filterStatsChecked, value);
- }
-
- public bool MediaImageStatsChecked
- {
- get => _mediaImageStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _mediaImageStatsChecked, value);
- }
-
- public bool MediaScanStatsChecked
- {
- get => _mediaScanStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _mediaScanStatsChecked, value);
- }
-
- public bool PartitionStatsChecked
- {
- get => _partitionStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _partitionStatsChecked, value);
- }
-
- public bool MediaStatsChecked
- {
- get => _mediaStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _mediaStatsChecked, value);
- }
-
- public bool VerifyStatsChecked
- {
- get => _verifyStatsChecked;
- set => this.RaiseAndSetIfChanged(ref _verifyStatsChecked, value);
- }
-
- public int TabControlSelectedIndex
- {
- get => _tabControlSelectedIndex;
- set => this.RaiseAndSetIfChanged(ref _tabControlSelectedIndex, value);
- }
-
- void ExecuteSaveCommand()
+ void Save()
{
Settings.Settings.Current.SaveReportsGlobally = SaveReportsGloballyChecked;
Settings.Settings.Current.ShareReports = ShareReportsChecked;
@@ -286,5 +212,5 @@ public sealed class SettingsViewModel : ViewModelBase
_view.Close();
}
- void ExecuteCancelCommand() => _view.Close();
+ void Cancel() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs
index 127420742..579ac4c7c 100644
--- a/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs
+++ b/Aaru.Gui/ViewModels/Dialogs/StatisticsViewModel.cs
@@ -32,14 +32,14 @@
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
+using System.Windows.Input;
using Aaru.Database;
using Aaru.Database.Models;
using Aaru.Gui.Models;
using Aaru.Gui.Views.Dialogs;
using Aaru.Localization;
+using CommunityToolkit.Mvvm.Input;
using JetBrains.Annotations;
-using ReactiveUI;
using NameCountModel = Aaru.Gui.Models.NameCountModel;
namespace Aaru.Gui.ViewModels.Dialogs;
@@ -96,7 +96,7 @@ public sealed class StatisticsViewModel : ViewModelBase
Filesystems = [];
Devices = [];
Medias = [];
- CloseCommand = ReactiveCommand.Create(ExecuteCloseCommand);
+ CloseCommand = new RelayCommand(Close);
using var ctx = AaruContext.Create(Settings.Settings.LocalDbPath);
if(ctx.Commands.Any())
@@ -481,235 +481,235 @@ public sealed class StatisticsViewModel : ViewModelBase
public string FsInfoText
{
get => _fsinfoText;
- set => this.RaiseAndSetIfChanged(ref _fsinfoText, value);
+ set => SetProperty(ref _fsinfoText, value);
}
public bool FsInfoVisible
{
get => _fsinfoVisible;
- set => this.RaiseAndSetIfChanged(ref _fsinfoVisible, value);
+ set => SetProperty(ref _fsinfoVisible, value);
}
public string ChecksumText
{
get => _checksumText;
- set => this.RaiseAndSetIfChanged(ref _checksumText, value);
+ set => SetProperty(ref _checksumText, value);
}
public bool ChecksumVisible
{
get => _checksumVisible;
- set => this.RaiseAndSetIfChanged(ref _checksumVisible, value);
+ set => SetProperty(ref _checksumVisible, value);
}
public string CompareText
{
get => _compareText;
- set => this.RaiseAndSetIfChanged(ref _compareText, value);
+ set => SetProperty(ref _compareText, value);
}
public bool CompareVisible
{
get => _compareVisible;
- set => this.RaiseAndSetIfChanged(ref _compareVisible, value);
+ set => SetProperty(ref _compareVisible, value);
}
public string ConvertImageText
{
get => _convertImageText;
- set => this.RaiseAndSetIfChanged(ref _convertImageText, value);
+ set => SetProperty(ref _convertImageText, value);
}
public bool ConvertImageVisible
{
get => _convertImageVisible;
- set => this.RaiseAndSetIfChanged(ref _convertImageVisible, value);
+ set => SetProperty(ref _convertImageVisible, value);
}
public string CreateSidecarText
{
get => _createSidecarText;
- set => this.RaiseAndSetIfChanged(ref _createSidecarText, value);
+ set => SetProperty(ref _createSidecarText, value);
}
public bool CreateSidecarVisible
{
get => _createSidecarVisible;
- set => this.RaiseAndSetIfChanged(ref _createSidecarVisible, value);
+ set => SetProperty(ref _createSidecarVisible, value);
}
public string DecodeText
{
get => _decodeText;
- set => this.RaiseAndSetIfChanged(ref _decodeText, value);
+ set => SetProperty(ref _decodeText, value);
}
public bool DecodeVisible
{
get => _decodeVisible;
- set => this.RaiseAndSetIfChanged(ref _decodeVisible, value);
+ set => SetProperty(ref _decodeVisible, value);
}
public string DeviceInfoText
{
get => _deviceInfoText;
- set => this.RaiseAndSetIfChanged(ref _deviceInfoText, value);
+ set => SetProperty(ref _deviceInfoText, value);
}
public bool DeviceInfoVisible
{
get => _deviceInfoVisible;
- set => this.RaiseAndSetIfChanged(ref _deviceInfoVisible, value);
+ set => SetProperty(ref _deviceInfoVisible, value);
}
public string DeviceReportText
{
get => _deviceReportText;
- set => this.RaiseAndSetIfChanged(ref _deviceReportText, value);
+ set => SetProperty(ref _deviceReportText, value);
}
public bool DeviceReportVisible
{
get => _deviceReportVisible;
- set => this.RaiseAndSetIfChanged(ref _deviceReportVisible, value);
+ set => SetProperty(ref _deviceReportVisible, value);
}
public string DumpMediaText
{
get => _dumpMediaText;
- set => this.RaiseAndSetIfChanged(ref _dumpMediaText, value);
+ set => SetProperty(ref _dumpMediaText, value);
}
public bool DumpMediaVisible
{
get => _dumpMediaVisible;
- set => this.RaiseAndSetIfChanged(ref _dumpMediaVisible, value);
+ set => SetProperty(ref _dumpMediaVisible, value);
}
public string EntropyText
{
get => _entropyText;
- set => this.RaiseAndSetIfChanged(ref _entropyText, value);
+ set => SetProperty(ref _entropyText, value);
}
public bool EntropyVisible
{
get => _entropyVisible;
- set => this.RaiseAndSetIfChanged(ref _entropyVisible, value);
+ set => SetProperty(ref _entropyVisible, value);
}
public string FormatsCommandText
{
get => _formatsText;
- set => this.RaiseAndSetIfChanged(ref _formatsText, value);
+ set => SetProperty(ref _formatsText, value);
}
public bool FormatsCommandVisible
{
get => _formatsCommandVisible;
- set => this.RaiseAndSetIfChanged(ref _formatsCommandVisible, value);
+ set => SetProperty(ref _formatsCommandVisible, value);
}
public string ImageInfoText
{
get => _imageInfoText;
- set => this.RaiseAndSetIfChanged(ref _imageInfoText, value);
+ set => SetProperty(ref _imageInfoText, value);
}
public bool ImageInfoVisible
{
get => _imageInfoVisible;
- set => this.RaiseAndSetIfChanged(ref _imageInfoVisible, value);
+ set => SetProperty(ref _imageInfoVisible, value);
}
public string MediaInfoText
{
get => _mediaInfoText;
- set => this.RaiseAndSetIfChanged(ref _mediaInfoText, value);
+ set => SetProperty(ref _mediaInfoText, value);
}
public bool MediaInfoVisible
{
get => _mediaInfoVisible;
- set => this.RaiseAndSetIfChanged(ref _mediaInfoVisible, value);
+ set => SetProperty(ref _mediaInfoVisible, value);
}
public string MediaScanText
{
get => _mediaScanText;
- set => this.RaiseAndSetIfChanged(ref _mediaScanText, value);
+ set => SetProperty(ref _mediaScanText, value);
}
public bool MediaScanVisible
{
get => _mediaScanVisible;
- set => this.RaiseAndSetIfChanged(ref _mediaScanVisible, value);
+ set => SetProperty(ref _mediaScanVisible, value);
}
public string PrintHexText
{
get => _printHexText;
- set => this.RaiseAndSetIfChanged(ref _printHexText, value);
+ set => SetProperty(ref _printHexText, value);
}
public bool PrintHexVisible
{
get => _printHexVisible;
- set => this.RaiseAndSetIfChanged(ref _printHexVisible, value);
+ set => SetProperty(ref _printHexVisible, value);
}
public string VerifyText
{
get => _verifyText;
- set => this.RaiseAndSetIfChanged(ref _verifyText, value);
+ set => SetProperty(ref _verifyText, value);
}
public bool VerifyVisible
{
get => _verifyVisible;
- set => this.RaiseAndSetIfChanged(ref _verifyVisible, value);
+ set => SetProperty(ref _verifyVisible, value);
}
public bool CommandsVisible
{
get => _commandsVisible;
- set => this.RaiseAndSetIfChanged(ref _commandsVisible, value);
+ set => SetProperty(ref _commandsVisible, value);
}
public bool FiltersVisible
{
get => _filtersVisible;
- set => this.RaiseAndSetIfChanged(ref _filtersVisible, value);
+ set => SetProperty(ref _filtersVisible, value);
}
public bool PartitionsVisible
{
get => _partitionsVisible;
- set => this.RaiseAndSetIfChanged(ref _partitionsVisible, value);
+ set => SetProperty(ref _partitionsVisible, value);
}
public bool FormatsVisible
{
get => _formatsVisible;
- set => this.RaiseAndSetIfChanged(ref _formatsVisible, value);
+ set => SetProperty(ref _formatsVisible, value);
}
public bool FilesystemsVisible
{
get => _filesystemsVisible;
- set => this.RaiseAndSetIfChanged(ref _filesystemsVisible, value);
+ set => SetProperty(ref _filesystemsVisible, value);
}
public bool DevicesVisible
{
get => _devicesVisible;
- set => this.RaiseAndSetIfChanged(ref _devicesVisible, value);
+ set => SetProperty(ref _devicesVisible, value);
}
public bool MediasVisible
{
get => _mediasVisible;
- set => this.RaiseAndSetIfChanged(ref _mediasVisible, value);
+ set => SetProperty(ref _mediasVisible, value);
}
[NotNull]
@@ -772,7 +772,7 @@ public sealed class StatisticsViewModel : ViewModelBase
[NotNull]
public string CloseLabel => UI.ButtonLabel_Close;
- public ReactiveCommand CloseCommand { get; }
+ public ICommand CloseCommand { get; }
public ObservableCollection Filters { get; }
public ObservableCollection Formats { get; }
public ObservableCollection Partitions { get; }
@@ -780,5 +780,5 @@ public sealed class StatisticsViewModel : ViewModelBase
public ObservableCollection Devices { get; }
public ObservableCollection Medias { get; }
- void ExecuteCloseCommand() => _view.Close();
+ void Close() => _view.Close();
}
\ No newline at end of file
diff --git a/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs
index 6086c02db..3027c8634 100644
--- a/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs
+++ b/Aaru.Gui/ViewModels/Panels/DeviceInfoViewModel.cs
@@ -33,8 +33,8 @@
using System;
using System.Collections.Generic;
using System.IO;
-using System.Reactive;
using System.Threading.Tasks;
+using System.Windows.Input;
using Aaru.Decoders.SCSI.SSC;
using Aaru.Devices;
using Aaru.Gui.ViewModels.Tabs;
@@ -42,110 +42,200 @@ using Aaru.Gui.Views.Tabs;
using Aaru.Localization;
using Avalonia.Controls;
using Avalonia.Platform.Storage;
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
using Humanizer;
using Humanizer.Localisation;
-using ReactiveUI;
using DeviceInfo = Aaru.Core.Devices.Info.DeviceInfo;
namespace Aaru.Gui.ViewModels.Panels;
-public sealed class DeviceInfoViewModel : ViewModelBase
+public sealed partial class DeviceInfoViewModel : ViewModelBase
{
readonly DeviceInfo _devInfo;
readonly Window _view;
- AtaInfo _ataInfo;
- string _blockLimits;
- string _blockSizeGranularity;
- string _cid;
- string _csd;
- string _densities;
- string _deviceType;
- string _extendedCsd;
- string _firewireGuid;
- string _firewireManufacturer;
- string _firewireModel;
- string _firewireModelId;
- string _firewireVendorId;
- bool _firewireVisible;
- bool _kreon;
- bool _kreonChallengeResponse;
- bool _kreonChallengeResponse360;
- bool _kreonDecryptSs;
- bool _kreonDecryptSs360;
- bool _kreonErrorSkipping;
- bool _kreonLock;
- bool _kreonWxripperUnlock;
- bool _kreonWxripperUnlock360;
- bool _kreonXtremeUnlock;
- bool _kreonXtremeUnlock360;
- string _manufacturer;
- string _maxBlockSize;
- string _mediumDensity;
- string _mediumTypes;
- string _minBlockSize;
- string _model;
- string _ocr;
- PcmciaInfo _pcmciaInfo;
- bool _plextorBitSetting;
- bool _plextorBitSettingDl;
- string _plextorCdReadTime;
- string _plextorCdWriteTime;
- string _plextorDiscs;
- string _plextorDvd;
- bool _plextorDvdPlusWriteTest;
- string _plextorDvdReadTime;
- bool _plextorDvdTimesVisible;
- string _plextorDvdWriteTime;
- bool _plextorEepromVisible;
- bool _plextorGigaRec;
- bool _plextorHidesRecordables;
- bool _plextorHidesSessions;
- bool _plextorHiding;
- bool _plextorPoweRec;
- bool _plextorPoweRecEnabled;
- string _plextorPoweRecLast;
- bool _plextorPoweRecLastVisible;
- string _plextorPoweRecMax;
- bool _plextorPoweRecMaxVisible;
- string _plextorPoweRecRecommended;
- bool _plextorPoweRecRecommendedVisible;
- string _plextorPoweRecSelected;
- bool _plextorPoweRecSelectedVisible;
- bool _plextorSecuRec;
- bool _plextorSilentMode;
- string _plextorSilentModeAccessTime;
- string _plextorSilentModeCdReadSpeedLimit;
- string _plextorSilentModeCdWriteSpeedLimit;
- string _plextorSilentModeDvdReadSpeedLimit;
- bool _plextorSilentModeDvdReadSpeedLimitVisible;
- bool _plextorSilentModeEnabled;
- bool _plextorSpeedEnabled;
- bool _plextorSpeedRead;
- bool _plextorVariRec;
- bool _plextorVariRecDvd;
- bool _plextorVisible;
- bool _removable;
- string _revision;
- bool _saveUsbDescriptorsEnabled;
- string _scr;
- ScsiInfo _scsiInfo;
- string _scsiType;
- string _sdMm;
- SdMmcInfo _sdMmcInfo;
- string _secureDigital;
- string _serial;
- bool _ssc;
- string _usbConnected;
- string _usbManufacturer;
- string _usbProduct;
- string _usbProductId;
- string _usbSerial;
- string _usbVendorId;
- bool _usbVisible;
+ [ObservableProperty]
+ AtaInfo _ataInfo;
+ [ObservableProperty]
+ string _blockLimits;
+ [ObservableProperty]
+ string _blockSizeGranularity;
+ [ObservableProperty]
+ string _cid;
+ [ObservableProperty]
+ string _csd;
+ [ObservableProperty]
+ string _densities;
+ [ObservableProperty]
+ string _deviceType;
+ [ObservableProperty]
+ string _extendedCsd;
+ [ObservableProperty]
+ string _firewireGuid;
+ [ObservableProperty]
+ string _firewireManufacturer;
+ [ObservableProperty]
+ string _firewireModel;
+ [ObservableProperty]
+ string _firewireModelId;
+ [ObservableProperty]
+ string _firewireVendorId;
+ [ObservableProperty]
+ bool _firewireVisible;
+ [ObservableProperty]
+ bool _kreon;
+ [ObservableProperty]
+ bool _kreonChallengeResponse;
+ [ObservableProperty]
+ bool _kreonChallengeResponse360;
+ [ObservableProperty]
+ bool _kreonDecryptSs;
+ [ObservableProperty]
+ bool _kreonDecryptSs360;
+ [ObservableProperty]
+ bool _kreonErrorSkipping;
+ [ObservableProperty]
+ bool _kreonLock;
+ [ObservableProperty]
+ bool _kreonWxripperUnlock;
+ [ObservableProperty]
+ bool _kreonWxripperUnlock360;
+ [ObservableProperty]
+ bool _kreonXtremeUnlock;
+ [ObservableProperty]
+ bool _kreonXtremeUnlock360;
+ [ObservableProperty]
+ string _manufacturer;
+ [ObservableProperty]
+ string _maxBlockSize;
+ [ObservableProperty]
+ string _mediumDensity;
+ [ObservableProperty]
+ string _mediumTypes;
+ [ObservableProperty]
+ string _minBlockSize;
+ [ObservableProperty]
+ string _model;
+ [ObservableProperty]
+ string _ocr;
+ [ObservableProperty]
+ PcmciaInfo _pcmciaInfo;
+ [ObservableProperty]
+ bool _plextorBitSetting;
+ [ObservableProperty]
+ bool _plextorBitSettingDl;
+ [ObservableProperty]
+ string _plextorCdReadTime;
+ [ObservableProperty]
+ string _plextorCdWriteTime;
+ [ObservableProperty]
+ string _plextorDiscs;
+ [ObservableProperty]
+ string _plextorDvd;
+ [ObservableProperty]
+ bool _plextorDvdPlusWriteTest;
+ [ObservableProperty]
+ string _plextorDvdReadTime;
+ [ObservableProperty]
+ bool _plextorDvdTimesVisible;
+ [ObservableProperty]
+ string _plextorDvdWriteTime;
+ [ObservableProperty]
+ bool _plextorEepromVisible;
+ [ObservableProperty]
+ bool _plextorGigaRec;
+ [ObservableProperty]
+ bool _plextorHidesRecordables;
+ [ObservableProperty]
+ bool _plextorHidesSessions;
+ [ObservableProperty]
+ bool _plextorHiding;
+ [ObservableProperty]
+ bool _plextorPoweRec;
+ [ObservableProperty]
+ bool _plextorPoweRecEnabled;
+ [ObservableProperty]
+ string _plextorPoweRecLast;
+ [ObservableProperty]
+ bool _plextorPoweRecLastVisible;
+ [ObservableProperty]
+ string _plextorPoweRecMax;
+ [ObservableProperty]
+ bool _plextorPoweRecMaxVisible;
+ [ObservableProperty]
+ string _plextorPoweRecRecommended;
+ [ObservableProperty]
+ bool _plextorPoweRecRecommendedVisible;
+ [ObservableProperty]
+ string _plextorPoweRecSelected;
+ [ObservableProperty]
+ bool _plextorPoweRecSelectedVisible;
+ [ObservableProperty]
+ bool _plextorSecuRec;
+ [ObservableProperty]
+ bool _plextorSilentMode;
+ [ObservableProperty]
+ string _plextorSilentModeAccessTime;
+ [ObservableProperty]
+ string _plextorSilentModeCdReadSpeedLimit;
+ [ObservableProperty]
+ string _plextorSilentModeCdWriteSpeedLimit;
+ [ObservableProperty]
+ string _plextorSilentModeDvdReadSpeedLimit;
+ [ObservableProperty]
+ bool _plextorSilentModeDvdReadSpeedLimitVisible;
+ [ObservableProperty]
+ bool _plextorSilentModeEnabled;
+ [ObservableProperty]
+ bool _plextorSpeedEnabled;
+ [ObservableProperty]
+ bool _plextorSpeedRead;
+ [ObservableProperty]
+ bool _plextorVariRec;
+ [ObservableProperty]
+ bool _plextorVariRecDvd;
+ [ObservableProperty]
+ bool _plextorVisible;
+ [ObservableProperty]
+ bool _removable;
+ [ObservableProperty]
+ string _revision;
+ [ObservableProperty]
+ bool _saveUsbDescriptorsEnabled;
+ [ObservableProperty]
+ string _scr;
+ [ObservableProperty]
+ ScsiInfo _scsiInfo;
+ [ObservableProperty]
+ string _scsiType;
+ [ObservableProperty]
+ string _sdMm;
+ [ObservableProperty]
+ SdMmcInfo _sdMmcInfo;
+ [ObservableProperty]
+ string _secureDigital;
+ [ObservableProperty]
+ string _serial;
+ [ObservableProperty]
+ bool _ssc;
+ [ObservableProperty]
+ string _usbConnected;
+ [ObservableProperty]
+ string _usbManufacturer;
+ [ObservableProperty]
+ string _usbProduct;
+ [ObservableProperty]
+ string _usbProductId;
+ [ObservableProperty]
+ string _usbSerial;
+ [ObservableProperty]
+ string _usbVendorId;
+ [ObservableProperty]
+ bool _usbVisible;
public DeviceInfoViewModel(DeviceInfo devInfo, Window view)
{
- SaveUsbDescriptorsCommand = ReactiveCommand.Create(ExecuteSaveUsbDescriptorsCommand);
+ SaveUsbDescriptorsCommand = new AsyncRelayCommand(SaveUsbDescriptorsAsync);
_view = view;
_devInfo = devInfo;
@@ -412,541 +502,7 @@ public sealed class DeviceInfoViewModel : ViewModelBase
};
}
- public ReactiveCommand SaveUsbDescriptorsCommand { get; }
-
- public string DeviceType
- {
- get => _deviceType;
- set => this.RaiseAndSetIfChanged(ref _deviceType, value);
- }
-
- public string Manufacturer
- {
- get => _manufacturer;
- set => this.RaiseAndSetIfChanged(ref _manufacturer, value);
- }
-
- public string Model
- {
- get => _model;
- set => this.RaiseAndSetIfChanged(ref _model, value);
- }
-
- public string Revision
- {
- get => _revision;
- set => this.RaiseAndSetIfChanged(ref _revision, value);
- }
-
- public string Serial
- {
- get => _serial;
- set => this.RaiseAndSetIfChanged(ref _serial, value);
- }
-
- public string ScsiType
- {
- get => _scsiType;
- set => this.RaiseAndSetIfChanged(ref _scsiType, value);
- }
-
- public bool Removable
- {
- get => _removable;
- set => this.RaiseAndSetIfChanged(ref _removable, value);
- }
-
- public string UsbConnected
- {
- get => _usbConnected;
- set => this.RaiseAndSetIfChanged(ref _usbConnected, value);
- }
-
- public bool UsbVisible
- {
- get => _usbVisible;
- set => this.RaiseAndSetIfChanged(ref _usbVisible, value);
- }
-
- public string UsbVendorId
- {
- get => _usbVendorId;
- set => this.RaiseAndSetIfChanged(ref _usbVendorId, value);
- }
-
- public string UsbProductId
- {
- get => _usbProductId;
- set => this.RaiseAndSetIfChanged(ref _usbProductId, value);
- }
-
- public string UsbManufacturer
- {
- get => _usbManufacturer;
- set => this.RaiseAndSetIfChanged(ref _usbManufacturer, value);
- }
-
- public string UsbProduct
- {
- get => _usbProduct;
- set => this.RaiseAndSetIfChanged(ref _usbProduct, value);
- }
-
- public string UsbSerial
- {
- get => _usbSerial;
- set => this.RaiseAndSetIfChanged(ref _usbSerial, value);
- }
-
- public bool SaveUsbDescriptorsEnabled
- {
- get => _saveUsbDescriptorsEnabled;
- set => this.RaiseAndSetIfChanged(ref _saveUsbDescriptorsEnabled, value);
- }
-
- public bool FirewireVisible
- {
- get => _firewireVisible;
- set => this.RaiseAndSetIfChanged(ref _firewireVisible, value);
- }
-
- public string FirewireVendorId
- {
- get => _firewireVendorId;
- set => this.RaiseAndSetIfChanged(ref _firewireVendorId, value);
- }
-
- public string FirewireModelId
- {
- get => _firewireModelId;
- set => this.RaiseAndSetIfChanged(ref _firewireModelId, value);
- }
-
- public string FirewireManufacturer
- {
- get => _firewireManufacturer;
- set => this.RaiseAndSetIfChanged(ref _firewireManufacturer, value);
- }
-
- public string FirewireModel
- {
- get => _firewireModel;
- set => this.RaiseAndSetIfChanged(ref _firewireModel, value);
- }
-
- public string FirewireGuid
- {
- get => _firewireGuid;
- set => this.RaiseAndSetIfChanged(ref _firewireGuid, value);
- }
-
- public bool PlextorVisible
- {
- get => _plextorVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorVisible, value);
- }
-
- public bool PlextorEepromVisible
- {
- get => _plextorEepromVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorEepromVisible, value);
- }
-
- public string PlextorDiscs
- {
- get => _plextorDiscs;
- set => this.RaiseAndSetIfChanged(ref _plextorDiscs, value);
- }
-
- public string PlextorCdReadTime
- {
- get => _plextorCdReadTime;
- set => this.RaiseAndSetIfChanged(ref _plextorCdReadTime, value);
- }
-
- public string PlextorCdWriteTime
- {
- get => _plextorCdWriteTime;
- set => this.RaiseAndSetIfChanged(ref _plextorCdWriteTime, value);
- }
-
- public bool PlextorDvdTimesVisible
- {
- get => _plextorDvdTimesVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorDvdTimesVisible, value);
- }
-
- public string PlextorDvdReadTime
- {
- get => _plextorDvdReadTime;
- set => this.RaiseAndSetIfChanged(ref _plextorDvdReadTime, value);
- }
-
- public string PlextorDvdWriteTime
- {
- get => _plextorDvdWriteTime;
- set => this.RaiseAndSetIfChanged(ref _plextorDvdWriteTime, value);
- }
-
- public bool PlextorPoweRec
- {
- get => _plextorPoweRec;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRec, value);
- }
-
- public bool PlextorPoweRecEnabled
- {
- get => _plextorPoweRecEnabled;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecEnabled, value);
- }
-
- public bool PlextorPoweRecRecommendedVisible
- {
- get => _plextorPoweRecRecommendedVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecRecommendedVisible, value);
- }
-
- public string PlextorPoweRecRecommended
- {
- get => _plextorPoweRecRecommended;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecRecommended, value);
- }
-
- public bool PlextorPoweRecSelectedVisible
- {
- get => _plextorPoweRecSelectedVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecSelectedVisible, value);
- }
-
- public string PlextorPoweRecSelected
- {
- get => _plextorPoweRecSelected;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecSelected, value);
- }
-
- public bool PlextorPoweRecMaxVisible
- {
- get => _plextorPoweRecMaxVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecMaxVisible, value);
- }
-
- public string PlextorPoweRecMax
- {
- get => _plextorPoweRecMax;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecMax, value);
- }
-
- public bool PlextorPoweRecLastVisible
- {
- get => _plextorPoweRecLastVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecLastVisible, value);
- }
-
- public string PlextorPoweRecLast
- {
- get => _plextorPoweRecLast;
- set => this.RaiseAndSetIfChanged(ref _plextorPoweRecLast, value);
- }
-
- public bool PlextorSilentMode
- {
- get => _plextorSilentMode;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentMode, value);
- }
-
- public bool PlextorSilentModeEnabled
- {
- get => _plextorSilentModeEnabled;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeEnabled, value);
- }
-
- public string PlextorSilentModeAccessTime
- {
- get => _plextorSilentModeAccessTime;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeAccessTime, value);
- }
-
- public string PlextorSilentModeCdReadSpeedLimit
- {
- get => _plextorSilentModeCdReadSpeedLimit;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeCdReadSpeedLimit, value);
- }
-
- public string PlextorSilentModeCdWriteSpeedLimit
- {
- get => _plextorSilentModeCdWriteSpeedLimit;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeCdWriteSpeedLimit, value);
- }
-
- public bool PlextorSilentModeDvdReadSpeedLimitVisible
- {
- get => _plextorSilentModeDvdReadSpeedLimitVisible;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeDvdReadSpeedLimitVisible, value);
- }
-
- public string PlextorSilentModeDvdReadSpeedLimit
- {
- get => _plextorSilentModeDvdReadSpeedLimit;
- set => this.RaiseAndSetIfChanged(ref _plextorSilentModeDvdReadSpeedLimit, value);
- }
-
- public bool PlextorGigaRec
- {
- get => _plextorGigaRec;
- set => this.RaiseAndSetIfChanged(ref _plextorGigaRec, value);
- }
-
- public bool PlextorSecuRec
- {
- get => _plextorSecuRec;
- set => this.RaiseAndSetIfChanged(ref _plextorSecuRec, value);
- }
-
- public bool PlextorSpeedRead
- {
- get => _plextorSpeedRead;
- set => this.RaiseAndSetIfChanged(ref _plextorSpeedRead, value);
- }
-
- public bool PlextorSpeedEnabled
- {
- get => _plextorSpeedEnabled;
- set => this.RaiseAndSetIfChanged(ref _plextorSpeedEnabled, value);
- }
-
- public bool PlextorHiding
- {
- get => _plextorHiding;
- set => this.RaiseAndSetIfChanged(ref _plextorHiding, value);
- }
-
- public bool PlextorHidesRecordables
- {
- get => _plextorHidesRecordables;
- set => this.RaiseAndSetIfChanged(ref _plextorHidesRecordables, value);
- }
-
- public bool PlextorHidesSessions
- {
- get => _plextorHidesSessions;
- set => this.RaiseAndSetIfChanged(ref _plextorHidesSessions, value);
- }
-
- public bool PlextorVariRec
- {
- get => _plextorVariRec;
- set => this.RaiseAndSetIfChanged(ref _plextorVariRec, value);
- }
-
- public string PlextorDvd
- {
- get => _plextorDvd;
- set => this.RaiseAndSetIfChanged(ref _plextorDvd, value);
- }
-
- public bool PlextorVariRecDvd
- {
- get => _plextorVariRecDvd;
- set => this.RaiseAndSetIfChanged(ref _plextorVariRecDvd, value);
- }
-
- public bool PlextorBitSetting
- {
- get => _plextorBitSetting;
- set => this.RaiseAndSetIfChanged(ref _plextorBitSetting, value);
- }
-
- public bool PlextorBitSettingDl
- {
- get => _plextorBitSettingDl;
- set => this.RaiseAndSetIfChanged(ref _plextorBitSettingDl, value);
- }
-
- public bool PlextorDvdPlusWriteTest
- {
- get => _plextorDvdPlusWriteTest;
- set => this.RaiseAndSetIfChanged(ref _plextorDvdPlusWriteTest, value);
- }
-
- public bool Kreon
- {
- get => _kreon;
- set => this.RaiseAndSetIfChanged(ref _kreon, value);
- }
-
- public bool KreonChallengeResponse
- {
- get => _kreonChallengeResponse;
- set => this.RaiseAndSetIfChanged(ref _kreonChallengeResponse, value);
- }
-
- public bool KreonDecryptSs
- {
- get => _kreonDecryptSs;
- set => this.RaiseAndSetIfChanged(ref _kreonDecryptSs, value);
- }
-
- public bool KreonXtremeUnlock
- {
- get => _kreonXtremeUnlock;
- set => this.RaiseAndSetIfChanged(ref _kreonXtremeUnlock, value);
- }
-
- public bool KreonWxripperUnlock
- {
- get => _kreonWxripperUnlock;
- set => this.RaiseAndSetIfChanged(ref _kreonWxripperUnlock, value);
- }
-
- public bool KreonChallengeResponse360
- {
- get => _kreonChallengeResponse360;
- set => this.RaiseAndSetIfChanged(ref _kreonChallengeResponse360, value);
- }
-
- public bool KreonDecryptSs360
- {
- get => _kreonDecryptSs360;
- set => this.RaiseAndSetIfChanged(ref _kreonDecryptSs360, value);
- }
-
- public bool KreonXtremeUnlock360
- {
- get => _kreonXtremeUnlock360;
- set => this.RaiseAndSetIfChanged(ref _kreonXtremeUnlock360, value);
- }
-
- public bool KreonWxripperUnlock360
- {
- get => _kreonWxripperUnlock360;
- set => this.RaiseAndSetIfChanged(ref _kreonWxripperUnlock360, value);
- }
-
- public bool KreonLock
- {
- get => _kreonLock;
- set => this.RaiseAndSetIfChanged(ref _kreonLock, value);
- }
-
- public bool KreonErrorSkipping
- {
- get => _kreonErrorSkipping;
- set => this.RaiseAndSetIfChanged(ref _kreonErrorSkipping, value);
- }
-
- public bool Ssc
- {
- get => _ssc;
- set => this.RaiseAndSetIfChanged(ref _ssc, value);
- }
-
- public string BlockLimits
- {
- get => _blockLimits;
- set => this.RaiseAndSetIfChanged(ref _blockLimits, value);
- }
-
- public string MinBlockSize
- {
- get => _minBlockSize;
- set => this.RaiseAndSetIfChanged(ref _minBlockSize, value);
- }
-
- public string MaxBlockSize
- {
- get => _maxBlockSize;
- set => this.RaiseAndSetIfChanged(ref _maxBlockSize, value);
- }
-
- public string BlockSizeGranularity
- {
- get => _blockSizeGranularity;
- set => this.RaiseAndSetIfChanged(ref _blockSizeGranularity, value);
- }
-
- public string Densities
- {
- get => _densities;
- set => this.RaiseAndSetIfChanged(ref _densities, value);
- }
-
- public string MediumTypes
- {
- get => _mediumTypes;
- set => this.RaiseAndSetIfChanged(ref _mediumTypes, value);
- }
-
- public string MediumDensity
- {
- get => _mediumDensity;
- set => this.RaiseAndSetIfChanged(ref _mediumDensity, value);
- }
-
- public string SecureDigital
- {
- get => _secureDigital;
- set => this.RaiseAndSetIfChanged(ref _secureDigital, value);
- }
-
- public string SdMm
- {
- get => _sdMm;
- set => this.RaiseAndSetIfChanged(ref _sdMm, value);
- }
-
- public string Cid
- {
- get => _cid;
- set => this.RaiseAndSetIfChanged(ref _cid, value);
- }
-
- public string Csd
- {
- get => _csd;
- set => this.RaiseAndSetIfChanged(ref _csd, value);
- }
-
- public string Ocr
- {
- get => _ocr;
- set => this.RaiseAndSetIfChanged(ref _ocr, value);
- }
-
- public string ExtendedCsd
- {
- get => _extendedCsd;
- set => this.RaiseAndSetIfChanged(ref _extendedCsd, value);
- }
-
- public string Scr
- {
- get => _scr;
- set => this.RaiseAndSetIfChanged(ref _scr, value);
- }
-
- public PcmciaInfo PcmciaInfo
- {
- get => _pcmciaInfo;
- set => this.RaiseAndSetIfChanged(ref _pcmciaInfo, value);
- }
-
- public ScsiInfo ScsiInfo
- {
- get => _scsiInfo;
- set => this.RaiseAndSetIfChanged(ref _scsiInfo, value);
- }
-
- public AtaInfo AtaInfo
- {
- get => _ataInfo;
- set => this.RaiseAndSetIfChanged(ref _ataInfo, value);
- }
-
- public SdMmcInfo SdMmcInfo
- {
- get => _sdMmcInfo;
- set => this.RaiseAndSetIfChanged(ref _sdMmcInfo, value);
- }
+ public ICommand SaveUsbDescriptorsCommand { get; }
public string DeviceInformationLabel => UI.Title_Device_information;
public string GeneralLabel => UI.Title_General;
@@ -1018,7 +574,7 @@ public sealed class DeviceInfoViewModel : ViewModelBase
public string SCSILabel => UI.Title_SCSI;
public string Sd_MMCLabel => UI.Title_SD_MMC;
- async Task ExecuteSaveUsbDescriptorsCommand()
+ async Task SaveUsbDescriptorsAsync()
{
IStorageFile result = await _view.StorageProvider.SaveFilePickerAsync(new FilePickerSaveOptions
{
diff --git a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs
index 7dc525486..779a8b09f 100644
--- a/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs
+++ b/Aaru.Gui/ViewModels/Panels/ImageInfoViewModel.cs
@@ -33,8 +33,8 @@
using System;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Reactive;
using System.Text;
+using System.Windows.Input;
using Aaru.CommonTypes.AaruMetadata;
using Aaru.CommonTypes.Enums;
using Aaru.CommonTypes.Interfaces;
@@ -53,9 +53,9 @@ using Aaru.Localization;
using Avalonia.Controls;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
+using CommunityToolkit.Mvvm.Input;
using Humanizer;
using Humanizer.Bytes;
-using ReactiveUI;
using Sentry;
using Inquiry = Aaru.CommonTypes.Structs.Devices.SCSI.Inquiry;
using Session = Aaru.CommonTypes.Structs.Session;
@@ -87,13 +87,13 @@ public sealed class ImageInfoViewModel : ViewModelBase
Sessions = [];
Tracks = [];
DumpHardwareList = [];
- EntropyCommand = ReactiveCommand.Create(ExecuteEntropyCommand);
- VerifyCommand = ReactiveCommand.Create(ExecuteVerifyCommand);
- ChecksumCommand = ReactiveCommand.Create(ExecuteChecksumCommand);
- ConvertCommand = ReactiveCommand.Create(ExecuteConvertCommand);
- CreateSidecarCommand = ReactiveCommand.Create(ExecuteCreateSidecarCommand);
- ViewSectorsCommand = ReactiveCommand.Create(ExecuteViewSectorsCommand);
- DecodeMediaTagCommand = ReactiveCommand.Create(ExecuteDecodeMediaTagCommand);
+ EntropyCommand = new RelayCommand(Entropy);
+ VerifyCommand = new RelayCommand(Verify);
+ ChecksumCommand = new RelayCommand(Checksum);
+ ConvertCommand = new RelayCommand(Convert);
+ CreateSidecarCommand = new RelayCommand(CreateSidecar);
+ ViewSectorsCommand = new RelayCommand(ViewSectors);
+ DecodeMediaTagCommand = new RelayCommand(DecodeMediaTag);
var genericHddIcon =
new Bitmap(AssetLoader.Open(new Uri("avares://Aaru.Gui/Assets/Icons/oxygen/32x32/drive-harddisk.png")));
@@ -780,13 +780,13 @@ public sealed class ImageInfoViewModel : ViewModelBase
public ObservableCollection Sessions { get; }
public ObservableCollection