Added ReactiveUI.Fody

This commit is contained in:
Justin Swanson 2019-11-02 18:23:11 -05:00
parent 12daa32d4e
commit 7438413fb6
8 changed files with 70 additions and 73 deletions

View File

@ -1,4 +1,5 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ReactiveUI />
<Costura>
<Unmanaged64Assemblies>
7z

View File

@ -4,6 +4,7 @@
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ReactiveUI" minOccurs="0" maxOccurs="1" type="xs:anyType" />
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:all>

View File

@ -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<BitmapImage> _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; }

View File

@ -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> _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<string> _HTMLReport;
public string HTMLReport => _HTMLReport.Value;
@ -53,20 +54,20 @@ namespace Wabbajack
/// <summary>
/// Tracks whether an install is currently in progress
/// </summary>
private bool _Installing;
public bool Installing { get => _Installing; set => this.RaiseAndSetIfChanged(ref _Installing, value); }
[Reactive]
public bool Installing { get; set; }
/// <summary>
/// Tracks whether to show the installing pane
/// </summary>
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<float> _ProgressPercent;
public float ProgressPercent => _ProgressPercent.Value;

View File

@ -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<ViewModel> _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<CPUStatus> _statusSubject = new Subject<CPUStatus>();
public IObservable<CPUStatus> StatusObservable => _statusSubject;
@ -38,8 +39,8 @@ namespace Wabbajack
private Subject<string> _logSubj = new Subject<string>();
public ObservableCollectionExtended<string> Log { get; } = new ObservableCollectionExtended<string>();
private RunMode _Mode;
public RunMode Mode { get => _Mode; set => this.RaiseAndSetIfChanged(ref _Mode, value); }
[Reactive]
public RunMode Mode { get; set; }
private readonly Lazy<CompilerVM> _Compiler;
private readonly Lazy<InstallerVM> _Installer;

View File

@ -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<ModlistMetadata> ModLists { get; } = new ObservableCollection<ModlistMetadata>(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()
{

View File

@ -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; }

View File

@ -339,6 +339,9 @@
<PackageReference Include="ReactiveUI.Events.WPF">
<Version>10.4.1</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<Version>10.5.7</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.WPF">
<Version>10.4.1</Version>
</PackageReference>