diff --git a/Wabbajack/FodyWeavers.xml b/Wabbajack/FodyWeavers.xml index 36bc693f..26ec15b8 100644 --- a/Wabbajack/FodyWeavers.xml +++ b/Wabbajack/FodyWeavers.xml @@ -1,4 +1,5 @@  + 7z diff --git a/Wabbajack/FodyWeavers.xsd b/Wabbajack/FodyWeavers.xsd index 44a53744..b2d3e296 100644 --- a/Wabbajack/FodyWeavers.xsd +++ b/Wabbajack/FodyWeavers.xsd @@ -4,6 +4,7 @@ + diff --git a/Wabbajack/View Models/CompilerVM.cs b/Wabbajack/View Models/CompilerVM.cs index 84f3d902..f9d68138 100644 --- a/Wabbajack/View Models/CompilerVM.cs +++ b/Wabbajack/View Models/CompilerVM.cs @@ -1,4 +1,5 @@ using ReactiveUI; +using ReactiveUI.Fody.Helpers; using Splat; using System; using System.Collections.Generic; @@ -20,44 +21,44 @@ namespace Wabbajack { public MainWindowVM MWVM { get; } - private string _Mo2Folder; - public string Mo2Folder { get => _Mo2Folder; set => this.RaiseAndSetIfChanged(ref _Mo2Folder, value); } + [Reactive] + public string Mo2Folder { get; set; } - private string _MOProfile; - public string MOProfile { get => _MOProfile; set => this.RaiseAndSetIfChanged(ref _MOProfile, value); } + [Reactive] + public string MOProfile { get; set; } - private string _ModListName; - public string ModListName { get => _ModListName; set => this.RaiseAndSetIfChanged(ref _ModListName, value); } + [Reactive] + public string ModListName { get; set; } - private string _Location; - public string Location { get => _Location; set => this.RaiseAndSetIfChanged(ref _Location, value); } + [Reactive] + public string Location { get; set; } - private bool _UIReady = true; - public bool UIReady { get => _UIReady; set => this.RaiseAndSetIfChanged(ref _UIReady, value); } + [Reactive] + public bool UIReady { get; set; } - private string _AuthorName; - public string AuthorName { get => _AuthorName; set => this.RaiseAndSetIfChanged(ref _AuthorName, value); } + [Reactive] + public string AuthorName { get; set; } - private string _Summary = "Description (700 characters max)"; - public string Summary { get => _Summary; set => this.RaiseAndSetIfChanged(ref _Summary, value); } + [Reactive] + public string Summary { get; set; } = "Description (700 characters max)"; - private string _ImagePath; - public string ImagePath { get => _ImagePath; set => this.RaiseAndSetIfChanged(ref _ImagePath, value); } + [Reactive] + public string ImagePath { get; set; } private readonly ObservableAsPropertyHelper _Image; public BitmapImage Image => _Image.Value; - private string _NexusSiteURL; - public string NexusSiteURL { get => _NexusSiteURL; set => this.RaiseAndSetIfChanged(ref _NexusSiteURL, value); } + [Reactive] + public string NexusSiteURL { get; set; } - private string _ReadMeText; - public string ReadMeText { get => _ReadMeText; set => this.RaiseAndSetIfChanged(ref _ReadMeText, value); } + [Reactive] + public string ReadMeText { get; set; } - private string _HTMLReport; - public string HTMLReport { get => _HTMLReport; set => this.RaiseAndSetIfChanged(ref _HTMLReport, value); } + [Reactive] + public string HTMLReport { get; set; } - private string _DownloadLocation; - public string DownloadLocation { get => _DownloadLocation; set => this.RaiseAndSetIfChanged(ref _DownloadLocation, value); } + [Reactive] + public string DownloadLocation { get; set; } public IReactiveCommand BeginCommand { get; } diff --git a/Wabbajack/View Models/InstallerVM.cs b/Wabbajack/View Models/InstallerVM.cs index 7d12f2bf..7da46ad6 100644 --- a/Wabbajack/View Models/InstallerVM.cs +++ b/Wabbajack/View Models/InstallerVM.cs @@ -27,6 +27,7 @@ using System.Reactive; using System.Text; using Wabbajack.Lib; using Splat; +using ReactiveUI.Fody.Helpers; namespace Wabbajack { @@ -41,11 +42,11 @@ namespace Wabbajack private readonly ObservableAsPropertyHelper _ModList; public ModList ModList => _ModList.Value; - private string _ModListPath; - public string ModListPath { get => _ModListPath; set => this.RaiseAndSetIfChanged(ref _ModListPath, value); } + [Reactive] + public string ModListPath { get; set; } - private bool _UIReady; - public bool UIReady { get => _UIReady; set => this.RaiseAndSetIfChanged(ref _UIReady, value); } + [Reactive] + public bool UIReady { get; set; } private readonly ObservableAsPropertyHelper _HTMLReport; public string HTMLReport => _HTMLReport.Value; @@ -53,20 +54,20 @@ namespace Wabbajack /// /// Tracks whether an install is currently in progress /// - private bool _Installing; - public bool Installing { get => _Installing; set => this.RaiseAndSetIfChanged(ref _Installing, value); } + [Reactive] + public bool Installing { get; set; } /// /// Tracks whether to show the installing pane /// - private bool _InstallingMode; - public bool InstallingMode { get => _InstallingMode; set => this.RaiseAndSetIfChanged(ref _InstallingMode, value); } + [Reactive] + public bool InstallingMode { get; set; } - private string _Location = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - public string Location { get => _Location; set => this.RaiseAndSetIfChanged(ref _Location, value); } + [Reactive] + public string Location { get; set; } = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - private string _DownloadLocation; - public string DownloadLocation { get => _DownloadLocation; set => this.RaiseAndSetIfChanged(ref _DownloadLocation, value); } + [Reactive] + public string DownloadLocation { get; set; } private readonly ObservableAsPropertyHelper _ProgressPercent; public float ProgressPercent => _ProgressPercent.Value; diff --git a/Wabbajack/View Models/MainWindowVM.cs b/Wabbajack/View Models/MainWindowVM.cs index 81365b34..64993fd1 100644 --- a/Wabbajack/View Models/MainWindowVM.cs +++ b/Wabbajack/View Models/MainWindowVM.cs @@ -1,6 +1,7 @@ using DynamicData; using DynamicData.Binding; using ReactiveUI; +using ReactiveUI.Fody.Helpers; using System; using System.Collections.Generic; using System.ComponentModel; @@ -28,8 +29,8 @@ namespace Wabbajack private readonly ObservableAsPropertyHelper _ActivePane; public ViewModel ActivePane => _ActivePane.Value; - private int _QueueProgress; - public int QueueProgress { get => _QueueProgress; set => this.RaiseAndSetIfChanged(ref _QueueProgress, value); } + [Reactive] + public int QueueProgress { get; set; } private readonly Subject _statusSubject = new Subject(); public IObservable StatusObservable => _statusSubject; @@ -38,8 +39,8 @@ namespace Wabbajack private Subject _logSubj = new Subject(); public ObservableCollectionExtended Log { get; } = new ObservableCollectionExtended(); - private RunMode _Mode; - public RunMode Mode { get => _Mode; set => this.RaiseAndSetIfChanged(ref _Mode, value); } + [Reactive] + public RunMode Mode { get; set; } private readonly Lazy _Compiler; private readonly Lazy _Installer; diff --git a/Wabbajack/View Models/ModeSelectionWindowVM.cs b/Wabbajack/View Models/ModeSelectionWindowVM.cs index 2f5ddae7..559a9b4a 100644 --- a/Wabbajack/View Models/ModeSelectionWindowVM.cs +++ b/Wabbajack/View Models/ModeSelectionWindowVM.cs @@ -1,4 +1,5 @@ using Alphaleonis.Win32.Filesystem; +using ReactiveUI.Fody.Helpers; using System; using System.Collections.Generic; using System.Collections.ObjectModel; @@ -15,24 +16,11 @@ namespace Wabbajack.UI { public ObservableCollection ModLists { get; } = new ObservableCollection(ModlistMetadata.LoadFromGithub()); - private ModlistMetadata _selectedModList; - public ModlistMetadata SelectedModList - { - get => _selectedModList; - set - { - CanInstall = true; - RaiseAndSetIfChanged(ref _selectedModList, value); - } - } + [Reactive] + public ModlistMetadata SelectedModList { get; set; } - private bool _canInstall; - - public bool CanInstall - { - get => _canInstall; - set => RaiseAndSetIfChanged(ref _canInstall, value); - } + [Reactive] + public bool CanInstall { get; set; } internal string Download() { diff --git a/Wabbajack/View Models/SlideShow.cs b/Wabbajack/View Models/SlideShow.cs index 579f69cf..59071acb 100644 --- a/Wabbajack/View Models/SlideShow.cs +++ b/Wabbajack/View Models/SlideShow.cs @@ -1,4 +1,5 @@ using ReactiveUI; +using ReactiveUI.Fody.Helpers; using Splat; using System; using System.Collections.Generic; @@ -36,29 +37,29 @@ namespace Wabbajack public BitmapImage NextIcon { get; } = UIUtils.BitmapImageFromResource("Wabbajack.Resources.Icons.next.png"); - private bool _ShowNSFW; - public bool ShowNSFW { get => _ShowNSFW; set => this.RaiseAndSetIfChanged(ref _ShowNSFW, value); } + [Reactive] + public bool ShowNSFW { get; set; } - private bool _GCAfterUpdating = true; - public bool GCAfterUpdating { get => _GCAfterUpdating; set => this.RaiseAndSetIfChanged(ref _GCAfterUpdating, value); } + [Reactive] + public bool GCAfterUpdating { get; set; } - private bool _Enable = true; - public bool Enable { get => _Enable; set => this.RaiseAndSetIfChanged(ref _Enable, value); } + [Reactive] + public bool Enable { get; set; } = true; - private BitmapImage _Image; - public BitmapImage Image { get => _Image; set => this.RaiseAndSetIfChanged(ref _Image, value); } + [Reactive] + public BitmapImage Image { get; set; } - private string _ModName = "Wabbajack"; - public string ModName { get => _ModName; set => this.RaiseAndSetIfChanged(ref _ModName, value); } + [Reactive] + public string ModName { get; set; } = "Wabbajack"; - private string _AuthorName = "Halgari & the Wabbajack Team"; - public string AuthorName { get => _AuthorName; set => this.RaiseAndSetIfChanged(ref _AuthorName, value); } + [Reactive] + public string AuthorName { get; set; } = "Halgari & the Wabbajack Team"; - private string _Description; - public string Description { get => _Description; set => this.RaiseAndSetIfChanged(ref _Description, value); } + [Reactive] + public string Description { get; set; } - private string _NexusSiteURL = "https://github.com/wabbajack-tools/wabbajack"; - public string NexusSiteURL { get => _NexusSiteURL; set => this.RaiseAndSetIfChanged(ref _NexusSiteURL, value); } + [Reactive] + public string NexusSiteURL { get; set; } = "https://github.com/wabbajack-tools/wabbajack"; public IReactiveCommand SlideShowNextItemCommand { get; } = ReactiveCommand.Create(() => { }); public IReactiveCommand VisitNexusSiteCommand { get; } diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index 34299852..52269a5e 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -339,6 +339,9 @@ 10.4.1 + + 10.5.7 + 10.4.1