From f026a666dd4939c898c5a2f394afd6a077e2e25b Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Sun, 19 Jan 2020 20:05:05 -0600 Subject: [PATCH 1/9] Bugfix for MO2 compiler not respecting targeted download folder --- Wabbajack/View Models/Compilers/MO2CompilerVM.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/Wabbajack/View Models/Compilers/MO2CompilerVM.cs b/Wabbajack/View Models/Compilers/MO2CompilerVM.cs index 945606a3..32fc866a 100644 --- a/Wabbajack/View Models/Compilers/MO2CompilerVM.cs +++ b/Wabbajack/View Models/Compilers/MO2CompilerVM.cs @@ -189,6 +189,7 @@ namespace Wabbajack ModListWebsite = ModlistSettings.Website, ModListReadme = ModlistSettings.ReadmeIsWebsite ? ModlistSettings.ReadmeWebsite : ModlistSettings.ReadmeFilePath.TargetPath, ReadmeIsWebsite = ModlistSettings.ReadmeIsWebsite, + MO2DownloadsFolder = DownloadLocation.TargetPath, }) { Parent.MWVM.Settings.Performance.AttachToBatchProcessor(ActiveCompilation); From d788a3ae955575fb45fa5a52123052bafafdf21d Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Mon, 20 Jan 2020 15:59:26 -0600 Subject: [PATCH 2/9] CompilerView swapped to RxUserControl --- Wabbajack/Extensions/IViewForExt.cs | 24 +++- Wabbajack/View Models/Compilers/CompilerVM.cs | 6 +- Wabbajack/Views/Common/CpuView.xaml.cs | 2 +- Wabbajack/Views/Compilers/CompilerView.xaml | 88 +++++------- .../Views/Compilers/CompilerView.xaml.cs | 135 +++++++++++++++++- Wabbajack/Views/MainWindow.xaml | 2 +- 6 files changed, 200 insertions(+), 57 deletions(-) diff --git a/Wabbajack/Extensions/IViewForExt.cs b/Wabbajack/Extensions/IViewForExt.cs index 083a7449..549cd367 100644 --- a/Wabbajack/Extensions/IViewForExt.cs +++ b/Wabbajack/Extensions/IViewForExt.cs @@ -54,6 +54,26 @@ namespace Wabbajack viewProperty: viewProperty); } + public static IReactiveBinding BindStrict( + this TView view, + TViewModel viewModel, + Expression> vmProperty, + Expression> viewProperty, + IObservable signalViewUpdate, + Func vmToViewConverter, + Func viewToVmConverter) + where TViewModel : class + where TView : class, IViewFor + { + return view.Bind( + viewModel: viewModel, + vmProperty: vmProperty, + viewProperty: viewProperty, + signalViewUpdate: signalViewUpdate, + vmToViewConverter: vmToViewConverter, + viewToVmConverter: viewToVmConverter); + } + public static IReactiveBinding BindStrict( this TView view, TViewModel viewModel, @@ -78,7 +98,9 @@ namespace Wabbajack Expression> property) where TTarget : class { - return @this.BindTo(target, property); + return @this + .ObserveOnGuiThread() + .BindTo(target, property); } /// diff --git a/Wabbajack/View Models/Compilers/CompilerVM.cs b/Wabbajack/View Models/Compilers/CompilerVM.cs index 00531ec9..daee630b 100644 --- a/Wabbajack/View Models/Compilers/CompilerVM.cs +++ b/Wabbajack/View Models/Compilers/CompilerVM.cs @@ -48,9 +48,9 @@ namespace Wabbajack public ObservableCollectionExtended Log => MWVM.Log; public ReactiveCommand BackCommand { get; } - public IReactiveCommand GoToModlistCommand { get; } - public IReactiveCommand CloseWhenCompleteCommand { get; } - public IReactiveCommand BeginCommand { get; } + public ReactiveCommand GoToModlistCommand { get; } + public ReactiveCommand CloseWhenCompleteCommand { get; } + public ReactiveCommand BeginCommand { get; } public FilePickerVM OutputLocation { get; } diff --git a/Wabbajack/Views/Common/CpuView.xaml.cs b/Wabbajack/Views/Common/CpuView.xaml.cs index 2899bfe5..72cf54c7 100644 --- a/Wabbajack/Views/Common/CpuView.xaml.cs +++ b/Wabbajack/Views/Common/CpuView.xaml.cs @@ -40,7 +40,7 @@ namespace Wabbajack set => SetValue(SettingsHookProperty, value); } public static readonly DependencyProperty SettingsHookProperty = DependencyProperty.Register(nameof(SettingsHook), typeof(MainSettings), typeof(CpuView), - new FrameworkPropertyMetadata(default(SettingsVM))); + new FrameworkPropertyMetadata(default(SettingsVM), WireNotifyPropertyChanged)); private bool _ShowingSettings; public bool ShowingSettings { get => _ShowingSettings; set => this.RaiseAndSetIfChanged(ref _ShowingSettings, value); } diff --git a/Wabbajack/Views/Compilers/CompilerView.xaml b/Wabbajack/Views/Compilers/CompilerView.xaml index 99c843f2..131801f0 100644 --- a/Wabbajack/Views/Compilers/CompilerView.xaml +++ b/Wabbajack/Views/Compilers/CompilerView.xaml @@ -1,4 +1,4 @@ - @@ -27,11 +29,11 @@ + Grid.ColumnSpan="5" /> + BorderThickness="1" /> - + + OverhangShadow="True" /> - + - + - + + ToolTip="Path to a readme file." /> + ToolTip="Readme website" /> public partial class AttentionBorder : UserControl { - public object DisplayContent - { - get => (object)GetValue(DisplayContentProperty); - set => SetValue(DisplayContentProperty, value); - } - public static readonly DependencyProperty DisplayContentProperty = DependencyProperty.Register(nameof(DisplayContent), typeof(object), typeof(AttentionBorder), - new FrameworkPropertyMetadata(default(object))); - public bool Failure { get => (bool)GetValue(FailureProperty); @@ -35,10 +27,5 @@ namespace Wabbajack } public static readonly DependencyProperty FailureProperty = DependencyProperty.Register(nameof(Failure), typeof(bool), typeof(AttentionBorder), new FrameworkPropertyMetadata(default(bool))); - - public AttentionBorder() - { - InitializeComponent(); - } } } diff --git a/Wabbajack/Views/Common/AttentionBorder.xaml b/Wabbajack/Views/Common/AttentionBorder.xaml deleted file mode 100644 index b1ba1137..00000000 --- a/Wabbajack/Views/Common/AttentionBorder.xaml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - - - diff --git a/Wabbajack/Views/Compilers/CompilationCompleteView.xaml b/Wabbajack/Views/Compilers/CompilationCompleteView.xaml index 3c69841f..947c5bd9 100644 --- a/Wabbajack/Views/Compilers/CompilationCompleteView.xaml +++ b/Wabbajack/Views/Compilers/CompilationCompleteView.xaml @@ -10,102 +10,101 @@ d:DesignWidth="800" mc:Ignorable="d"> - - + + + + + + + + + + + + + + + + + + + - - + + - - - - - - + + + - - - - - - - - + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - + + - + diff --git a/Wabbajack/Views/Compilers/CompilerView.xaml b/Wabbajack/Views/Compilers/CompilerView.xaml index 131801f0..821b1ccf 100644 --- a/Wabbajack/Views/Compilers/CompilerView.xaml +++ b/Wabbajack/Views/Compilers/CompilerView.xaml @@ -299,13 +299,11 @@ + ViewModel="{Binding}" /> - - - - - + + + diff --git a/Wabbajack/Views/Installers/InstallationCompleteView.xaml b/Wabbajack/Views/Installers/InstallationCompleteView.xaml index 26edba90..32d1e61c 100644 --- a/Wabbajack/Views/Installers/InstallationCompleteView.xaml +++ b/Wabbajack/Views/Installers/InstallationCompleteView.xaml @@ -10,146 +10,144 @@ d:DesignWidth="800" mc:Ignorable="d"> - - + + + + + + + + + + + + + + + + + + + + - - + + - - - - - - - + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + Text="Main Menu" /> - + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Wabbajack/Views/Installers/InstallationView.xaml b/Wabbajack/Views/Installers/InstallationView.xaml index f3f11ee4..7616daa3 100644 --- a/Wabbajack/Views/Installers/InstallationView.xaml +++ b/Wabbajack/Views/Installers/InstallationView.xaml @@ -430,12 +430,10 @@ ViewModel="{Binding}" Visibility="{Binding ActiveGlobalUserIntervention, Converter={StaticResource IsNotNullVisibilityConverter}, ConverterParameter=False}" /> - - - - - - + + + + diff --git a/Wabbajack/Wabbajack.csproj b/Wabbajack/Wabbajack.csproj index bec54fb2..d20916db 100644 --- a/Wabbajack/Wabbajack.csproj +++ b/Wabbajack/Wabbajack.csproj @@ -174,6 +174,7 @@ + ModListTileView.xaml @@ -202,9 +203,6 @@ SettingsView.xaml - - AttentionBorder.xaml - UnderMaintenanceOverlay.xaml @@ -308,6 +306,10 @@ WebBrowserView.xaml + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -329,10 +331,6 @@ Designer MSBuild:Compile - - Designer - MSBuild:Compile - Designer MSBuild:Compile From 86391512bc0933073cbc563e69255fe0916bb3e6 Mon Sep 17 00:00:00 2001 From: Justin Swanson Date: Mon, 20 Jan 2020 16:26:45 -0600 Subject: [PATCH 4/9] CompilationCompleteView swapped to RxUserControl --- .../Compilers/CompilationCompleteView.xaml | 28 +++++++----------- .../Compilers/CompilationCompleteView.xaml.cs | 29 ++++++++++++++++++- Wabbajack/Views/Compilers/CompilerView.xaml | 5 +++- 3 files changed, 42 insertions(+), 20 deletions(-) diff --git a/Wabbajack/Views/Compilers/CompilationCompleteView.xaml b/Wabbajack/Views/Compilers/CompilationCompleteView.xaml index 947c5bd9..b0302a94 100644 --- a/Wabbajack/Views/Compilers/CompilationCompleteView.xaml +++ b/Wabbajack/Views/Compilers/CompilationCompleteView.xaml @@ -1,4 +1,4 @@ - - + @@ -21,6 +23,7 @@ - - - -->