mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Add boilerplate for starting on compiler file manager
This commit is contained in:
parent
2c2ce89698
commit
9af6e8a4c8
@ -168,8 +168,9 @@ namespace Wabbajack
|
|||||||
|
|
||||||
services.AddTransient<HomeVM>();
|
services.AddTransient<HomeVM>();
|
||||||
services.AddTransient<ModListGalleryVM>();
|
services.AddTransient<ModListGalleryVM>();
|
||||||
services.AddTransient<CompilerDetailsVM>();
|
|
||||||
services.AddTransient<CompilerHomeVM>();
|
services.AddTransient<CompilerHomeVM>();
|
||||||
|
services.AddTransient<CompilerDetailsVM>();
|
||||||
|
services.AddTransient<CompilerFileManagerVM>();
|
||||||
services.AddTransient<InstallerVM>();
|
services.AddTransient<InstallerVM>();
|
||||||
services.AddTransient<SettingsVM>();
|
services.AddTransient<SettingsVM>();
|
||||||
services.AddTransient<WebBrowserVM>();
|
services.AddTransient<WebBrowserVM>();
|
||||||
|
@ -6,17 +6,16 @@ using Wabbajack.Paths;
|
|||||||
|
|
||||||
namespace Wabbajack.Messages;
|
namespace Wabbajack.Messages;
|
||||||
|
|
||||||
public class LoadModlistForCompiling
|
public class LoadCompilerSettings
|
||||||
{
|
{
|
||||||
public CompilerSettings CompilerSettings { get; set; }
|
public CompilerSettings CompilerSettings { get; set; }
|
||||||
public LoadModlistForCompiling(CompilerSettings cs)
|
public LoadCompilerSettings(CompilerSettings cs)
|
||||||
{
|
{
|
||||||
CompilerSettings = cs;
|
CompilerSettings = cs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void Send(CompilerSettings cs)
|
public static void Send(CompilerSettings cs)
|
||||||
{
|
{
|
||||||
MessageBus.Current.SendMessage(new LoadModlistForCompiling(cs));
|
MessageBus.Current.SendMessage(new LoadCompilerSettings(cs));
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -8,8 +8,9 @@ public enum ScreenType
|
|||||||
ModListGallery,
|
ModListGallery,
|
||||||
Installer,
|
Installer,
|
||||||
Settings,
|
Settings,
|
||||||
CompilerDetails,
|
|
||||||
CompilerHome,
|
CompilerHome,
|
||||||
|
CompilerDetails,
|
||||||
|
CompilerFileManager,
|
||||||
ModListContents,
|
ModListContents,
|
||||||
WebBrowser
|
WebBrowser
|
||||||
}
|
}
|
||||||
|
@ -1141,7 +1141,7 @@
|
|||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="MainButtonStyle" TargetType="{x:Type Button}">
|
<Style x:Key="MainButtonBaseStyle" TargetType="{x:Type Button}">
|
||||||
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
|
||||||
<Setter Property="Background" Value="{StaticResource DarkBackgroundBrush}" />
|
<Setter Property="Background" Value="{StaticResource DarkBackgroundBrush}" />
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
||||||
@ -1151,6 +1151,36 @@
|
|||||||
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
<Setter Property="HorizontalContentAlignment" Value="Center" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||||
<Setter Property="Padding" Value="1" />
|
<Setter Property="Padding" Value="1" />
|
||||||
|
|
||||||
|
<Style.Resources>
|
||||||
|
<Style TargetType="ic:SymbolIcon">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=IsMouseOver}" Value="True">
|
||||||
|
<Setter Property="IsFilled" Value="True"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Style.Resources>
|
||||||
|
|
||||||
|
<Style.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
|
<Setter Property="Background" Value="{StaticResource DarkHoverBackgroundBrush}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource MahApps.Brushes.Transparent}" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="true">
|
||||||
|
<Setter Property="Background" Value="{StaticResource PressedButtonBackground}" />
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource MahApps.Brushes.Transparent}" />
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource PrimaryBrush}" />
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="false">
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource DisabledButtonForeground}" />
|
||||||
|
<Setter Property="Background" Value="{StaticResource DisabledButtonBackground}" />
|
||||||
|
</Trigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="MainButtonStyle" BasedOn="{StaticResource MainButtonBaseStyle}" TargetType="{x:Type Button}">
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type Button}">
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
@ -1187,23 +1217,8 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style.Resources>
|
|
||||||
<Style TargetType="ic:SymbolIcon">
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Button}, Path=IsMouseOver}" Value="True">
|
|
||||||
<Setter Property="IsFilled" Value="True"/>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Style.Resources>
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="LargeButtonStyle" TargetType="{x:Type Button}">
|
<Style x:Key="LargeButtonStyle" BasedOn="{StaticResource MainButtonStyle}" TargetType="{x:Type Button}">
|
||||||
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
|
|
||||||
<Setter Property="Background" Value="{StaticResource DarkBackgroundBrush}" />
|
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
|
||||||
<Setter Property="BorderThickness" Value="1" />
|
|
||||||
<Setter Property="Focusable" Value="False" />
|
|
||||||
<Setter Property="Foreground" Value="{StaticResource ButtonForeground}" />
|
|
||||||
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
||||||
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
<Setter Property="VerticalContentAlignment" Value="Stretch" />
|
||||||
<Setter Property="Padding" Value="2" />
|
<Setter Property="Padding" Value="2" />
|
||||||
@ -1244,15 +1259,6 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Style.Resources>
|
|
||||||
<Style TargetType="ic:SymbolIcon">
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource AncestorType=Button, AncestorLevel=1}, Path=IsMouseOver}" Value="True">
|
|
||||||
<Setter Property="IsFilled" Value="True" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Style.Resources>
|
|
||||||
</Style>
|
</Style>
|
||||||
<Style x:Key="MainNavButtonStyle" BasedOn="{StaticResource MainButtonStyle}" TargetType="{x:Type Button}">
|
<Style x:Key="MainNavButtonStyle" BasedOn="{StaticResource MainButtonStyle}" TargetType="{x:Type Button}">
|
||||||
<Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}"/>
|
<Setter Property="Background" Value="{StaticResource WindowBackgroundBrush}"/>
|
||||||
@ -1388,6 +1394,39 @@
|
|||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="AltButtonStyle" BasedOn="{StaticResource MainButtonStyle}" TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Background" Value="{StaticResource PrimaryBrush}"/>
|
||||||
|
<Setter Property="Foreground" Value="{StaticResource BackgroundBrush}"/>
|
||||||
|
<Setter Property="FontSize" Value="14"/>
|
||||||
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="WizardButtonStyle" BasedOn="{StaticResource AltButtonStyle}" TargetType="{x:Type Button}">
|
||||||
|
<Setter Property="Width" Value="200" />
|
||||||
|
<Setter Property="Margin" Value="0, 8, 0, 0" />
|
||||||
|
<Setter Property="HorizontalAlignment" Value="Right" />
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Grid>
|
||||||
|
<Border
|
||||||
|
Background="{TemplateBinding Background}"
|
||||||
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
|
CornerRadius="4" >
|
||||||
|
<ContentPresenter
|
||||||
|
Margin="{TemplateBinding Padding}"
|
||||||
|
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||||
|
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||||
|
RecognizesAccessKey="True"
|
||||||
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
|
|
||||||
<!-- ToggleButton -->
|
<!-- ToggleButton -->
|
||||||
<Style TargetType="{x:Type ToggleButton}">
|
<Style TargetType="{x:Type ToggleButton}">
|
||||||
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
|
<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}" />
|
||||||
|
@ -27,7 +27,7 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
_logger.LogInformation($"Selected modlist {CompilerSettings.ModListName} for compilation, located in '{CompilerSettings.Source}'");
|
_logger.LogInformation($"Selected modlist {CompilerSettings.ModListName} for compilation, located in '{CompilerSettings.Source}'");
|
||||||
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
||||||
LoadModlistForCompiling.Send(CompilerSettings);
|
LoadCompilerSettings.Send(CompilerSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -66,8 +66,9 @@ namespace Wabbajack
|
|||||||
|
|
||||||
public FilePickerVM ModListImageLocation { get; } = new();
|
public FilePickerVM ModListImageLocation { get; } = new();
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> ExecuteCommand { get; }
|
/* public ReactiveCommand<Unit, Unit> ExecuteCommand { get; } */
|
||||||
public ReactiveCommand<Unit, Unit> ReInferSettingsCommand { get; set; }
|
public ReactiveCommand<Unit, Unit> ReInferSettingsCommand { get; set; }
|
||||||
|
public ReactiveCommand<Unit, Unit> NextCommand { get; }
|
||||||
|
|
||||||
public LogStream LoggerProvider { get; }
|
public LogStream LoggerProvider { get; }
|
||||||
public ReadOnlyObservableCollection<CPUDisplayVM> StatusList => _resourceMonitor.Tasks;
|
public ReadOnlyObservableCollection<CPUDisplayVM> StatusList => _resourceMonitor.Tasks;
|
||||||
@ -88,7 +89,7 @@ namespace Wabbajack
|
|||||||
_inferencer = inferencer;
|
_inferencer = inferencer;
|
||||||
_wjClient = wjClient;
|
_wjClient = wjClient;
|
||||||
|
|
||||||
MessageBus.Current.Listen<LoadModlistForCompiling>()
|
MessageBus.Current.Listen<LoadCompilerSettings>()
|
||||||
.Subscribe(msg => {
|
.Subscribe(msg => {
|
||||||
var csVm = new CompilerSettingsVM(msg.CompilerSettings);
|
var csVm = new CompilerSettingsVM(msg.CompilerSettings);
|
||||||
ModlistLocation.TargetPath = csVm.ProfilePath;
|
ModlistLocation.TargetPath = csVm.ProfilePath;
|
||||||
@ -110,7 +111,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
SubCompilerVM = new MO2CompilerVM(this);
|
SubCompilerVM = new MO2CompilerVM(this);
|
||||||
|
|
||||||
ExecuteCommand = ReactiveCommand.CreateFromTask(async () => await StartCompilation());
|
//ExecuteCommand = ReactiveCommand.CreateFromTask(async () => await StartCompilation());
|
||||||
/*ReInferSettingsCommand = ReactiveCommand.CreateFromTask(async () => await ReInferSettings(),
|
/*ReInferSettingsCommand = ReactiveCommand.CreateFromTask(async () => await ReInferSettings(),
|
||||||
|
|
||||||
this.WhenAnyValue(vm => vm.Settings.Source)
|
this.WhenAnyValue(vm => vm.Settings.Source)
|
||||||
@ -121,6 +122,7 @@ namespace Wabbajack
|
|||||||
.Select(p => !string.IsNullOrWhiteSpace(p)))
|
.Select(p => !string.IsNullOrWhiteSpace(p)))
|
||||||
.Select(v => v.First && v.Second));
|
.Select(v => v.First && v.Second));
|
||||||
*/
|
*/
|
||||||
|
NextCommand = ReactiveCommand.CreateFromTask(async () => await NextPage());
|
||||||
|
|
||||||
ModlistLocation = new FilePickerVM
|
ModlistLocation = new FilePickerVM
|
||||||
{
|
{
|
||||||
@ -260,6 +262,12 @@ namespace Wabbajack
|
|||||||
return settings;
|
return settings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private async Task NextPage()
|
||||||
|
{
|
||||||
|
NavigateToGlobal.Send(ScreenType.CompilerFileManager);
|
||||||
|
LoadCompilerSettings.Send(Settings.ToCompilerSettings());
|
||||||
|
}
|
||||||
|
|
||||||
private async Task StartCompilation()
|
private async Task StartCompilation()
|
||||||
{
|
{
|
||||||
var tsk = Task.Run(async () =>
|
var tsk = Task.Run(async () =>
|
@ -0,0 +1,99 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reactive;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Wabbajack.Messages;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System.Reactive.Disposables;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using System.Text.Json;
|
||||||
|
using System.Threading;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Media;
|
||||||
|
using DynamicData;
|
||||||
|
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||||
|
using ReactiveUI.Fody.Helpers;
|
||||||
|
using Wabbajack.Common;
|
||||||
|
using Wabbajack.Compiler;
|
||||||
|
using Wabbajack.DTOs;
|
||||||
|
using Wabbajack.DTOs.JsonConverters;
|
||||||
|
using Wabbajack.Extensions;
|
||||||
|
using Wabbajack.Installer;
|
||||||
|
using Wabbajack.Models;
|
||||||
|
using Wabbajack.Networking.WabbajackClientApi;
|
||||||
|
using Wabbajack.Paths;
|
||||||
|
using Wabbajack.Paths.IO;
|
||||||
|
using Wabbajack.RateLimiter;
|
||||||
|
using Wabbajack.Services.OSIntegrated;
|
||||||
|
|
||||||
|
namespace Wabbajack
|
||||||
|
{
|
||||||
|
public class CompilerFileManagerVM : BackNavigatingVM
|
||||||
|
{
|
||||||
|
private readonly DTOSerializer _dtos;
|
||||||
|
private readonly SettingsManager _settingsManager;
|
||||||
|
private readonly IServiceProvider _serviceProvider;
|
||||||
|
private readonly ILogger<CompilerFileManagerVM> _logger;
|
||||||
|
private readonly ResourceMonitor _resourceMonitor;
|
||||||
|
private readonly CompilerSettingsInferencer _inferencer;
|
||||||
|
private readonly Client _wjClient;
|
||||||
|
|
||||||
|
[Reactive] public CompilerSettingsVM Settings { get; set; } = new();
|
||||||
|
|
||||||
|
public CompilerFileManagerVM(ILogger<CompilerFileManagerVM> logger, DTOSerializer dtos, SettingsManager settingsManager,
|
||||||
|
IServiceProvider serviceProvider, LogStream loggerProvider, ResourceMonitor resourceMonitor,
|
||||||
|
CompilerSettingsInferencer inferencer, Client wjClient) : base(logger)
|
||||||
|
{
|
||||||
|
_logger = logger;
|
||||||
|
_dtos = dtos;
|
||||||
|
_settingsManager = settingsManager;
|
||||||
|
_serviceProvider = serviceProvider;
|
||||||
|
_resourceMonitor = resourceMonitor;
|
||||||
|
_inferencer = inferencer;
|
||||||
|
_wjClient = wjClient;
|
||||||
|
|
||||||
|
MessageBus.Current.Listen<LoadCompilerSettings>()
|
||||||
|
.Subscribe(msg => {
|
||||||
|
var csVm = new CompilerSettingsVM(msg.CompilerSettings);
|
||||||
|
Settings = csVm;
|
||||||
|
})
|
||||||
|
.DisposeWith(CompositeDisposable);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task NextPage()
|
||||||
|
{
|
||||||
|
NavigateToGlobal.Send(ScreenType.CompilerFileManager);
|
||||||
|
LoadCompilerSettings.Send(Settings.ToCompilerSettings());
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task SaveSettingsFile()
|
||||||
|
{
|
||||||
|
if (Settings.Source == default || Settings.CompilerSettingsPath == default) return;
|
||||||
|
|
||||||
|
await using var st = Settings.CompilerSettingsPath.Open(FileMode.Create, FileAccess.Write, FileShare.None);
|
||||||
|
await JsonSerializer.SerializeAsync(st, Settings.ToCompilerSettings(), _dtos.Options);
|
||||||
|
|
||||||
|
var allSavedCompilerSettings = await _settingsManager.Load<List<AbsolutePath>>(Consts.AllSavedCompilerSettingsPaths);
|
||||||
|
|
||||||
|
// Don't simply remove Settings.CompilerSettingsPath here, because WJ sometimes likes to make default compiler settings files
|
||||||
|
allSavedCompilerSettings.RemoveAll(path => path.Parent == Settings.Source);
|
||||||
|
allSavedCompilerSettings.Insert(0, Settings.CompilerSettingsPath);
|
||||||
|
|
||||||
|
await _settingsManager.Save(Consts.AllSavedCompilerSettingsPaths, allSavedCompilerSettings);
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task LoadLastSavedSettings()
|
||||||
|
{
|
||||||
|
AbsolutePath lastPath = default;
|
||||||
|
var allSavedCompilerSettings = await _settingsManager.Load<List<AbsolutePath>>(Consts.AllSavedCompilerSettingsPaths);
|
||||||
|
if (allSavedCompilerSettings.Any())
|
||||||
|
lastPath = allSavedCompilerSettings[0];
|
||||||
|
|
||||||
|
if (lastPath == default || !lastPath.FileExists() || lastPath.FileName.Extension != Ext.CompilerSettings) return;
|
||||||
|
//ModlistLocation.TargetPath = lastPath;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -65,7 +65,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
NewModListCommand = ReactiveCommand.Create(() => {
|
NewModListCommand = ReactiveCommand.Create(() => {
|
||||||
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
||||||
LoadModlistForCompiling.Send(new());
|
LoadCompilerSettings.Send(new());
|
||||||
});
|
});
|
||||||
|
|
||||||
LoadSettingsCommand = ReactiveCommand.Create(() =>
|
LoadSettingsCommand = ReactiveCommand.Create(() =>
|
||||||
@ -75,7 +75,7 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
NavigateToGlobal.Send(ScreenType.CompilerDetails);
|
||||||
var compilerSettings = _dtos.Deserialize<CompilerSettings>(File.ReadAllText(CompilerSettingsPicker.TargetPath.ToString()));
|
var compilerSettings = _dtos.Deserialize<CompilerSettings>(File.ReadAllText(CompilerSettingsPicker.TargetPath.ToString()));
|
||||||
LoadModlistForCompiling.Send(compilerSettings);
|
LoadCompilerSettings.Send(compilerSettings);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
@ -44,8 +44,9 @@ namespace Wabbajack
|
|||||||
|
|
||||||
public ObservableCollectionExtended<IStatusMessage> Log { get; } = new ObservableCollectionExtended<IStatusMessage>();
|
public ObservableCollectionExtended<IStatusMessage> Log { get; } = new ObservableCollectionExtended<IStatusMessage>();
|
||||||
|
|
||||||
public readonly CompilerDetailsVM CompilerDetailsVM;
|
|
||||||
public readonly CompilerHomeVM CompilerHomeVM;
|
public readonly CompilerHomeVM CompilerHomeVM;
|
||||||
|
public readonly CompilerDetailsVM CompilerDetailsVM;
|
||||||
|
public readonly CompilerFileManagerVM CompilerFileManagerVM;
|
||||||
public readonly InstallerVM InstallerVM;
|
public readonly InstallerVM InstallerVM;
|
||||||
public readonly SettingsVM SettingsPaneVM;
|
public readonly SettingsVM SettingsPaneVM;
|
||||||
public readonly ModListGalleryVM GalleryVM;
|
public readonly ModListGalleryVM GalleryVM;
|
||||||
@ -79,7 +80,7 @@ namespace Wabbajack
|
|||||||
|
|
||||||
public MainWindowVM(ILogger<MainWindowVM> logger, Client wjClient,
|
public MainWindowVM(ILogger<MainWindowVM> logger, Client wjClient,
|
||||||
IServiceProvider serviceProvider, HomeVM homeVM, ModListGalleryVM modListGalleryVM, ResourceMonitor resourceMonitor,
|
IServiceProvider serviceProvider, HomeVM homeVM, ModListGalleryVM modListGalleryVM, ResourceMonitor resourceMonitor,
|
||||||
InstallerVM installerVM, CompilerDetailsVM compilerVM, CompilerHomeVM compilerHomeVM, SettingsVM settingsVM, WebBrowserVM webBrowserVM, NavigationVM navigationVM)
|
InstallerVM installerVM, CompilerHomeVM compilerHomeVM, CompilerDetailsVM compilerVM, CompilerFileManagerVM compilerFileManagerVM, SettingsVM settingsVM, WebBrowserVM webBrowserVM, NavigationVM navigationVM)
|
||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
_wjClient = wjClient;
|
_wjClient = wjClient;
|
||||||
@ -87,8 +88,9 @@ namespace Wabbajack
|
|||||||
_serviceProvider = serviceProvider;
|
_serviceProvider = serviceProvider;
|
||||||
ConverterRegistration.Register();
|
ConverterRegistration.Register();
|
||||||
InstallerVM = installerVM;
|
InstallerVM = installerVM;
|
||||||
CompilerDetailsVM = compilerVM;
|
|
||||||
CompilerHomeVM = compilerHomeVM;
|
CompilerHomeVM = compilerHomeVM;
|
||||||
|
CompilerDetailsVM = compilerVM;
|
||||||
|
CompilerFileManagerVM = compilerFileManagerVM;
|
||||||
SettingsPaneVM = settingsVM;
|
SettingsPaneVM = settingsVM;
|
||||||
GalleryVM = modListGalleryVM;
|
GalleryVM = modListGalleryVM;
|
||||||
HomeVM = homeVM;
|
HomeVM = homeVM;
|
||||||
@ -235,8 +237,9 @@ namespace Wabbajack
|
|||||||
ScreenType.Home => HomeVM,
|
ScreenType.Home => HomeVM,
|
||||||
ScreenType.ModListGallery => GalleryVM,
|
ScreenType.ModListGallery => GalleryVM,
|
||||||
ScreenType.Installer => InstallerVM,
|
ScreenType.Installer => InstallerVM,
|
||||||
ScreenType.CompilerDetails => CompilerDetailsVM,
|
|
||||||
ScreenType.CompilerHome => CompilerHomeVM,
|
ScreenType.CompilerHome => CompilerHomeVM,
|
||||||
|
ScreenType.CompilerDetails => CompilerDetailsVM,
|
||||||
|
ScreenType.CompilerFileManager => CompilerFileManagerVM,
|
||||||
ScreenType.Settings => SettingsPaneVM,
|
ScreenType.Settings => SettingsPaneVM,
|
||||||
_ => ActivePane
|
_ => ActivePane
|
||||||
};
|
};
|
||||||
|
@ -56,7 +56,7 @@
|
|||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Rectangle Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2"
|
<Rectangle Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
Fill="{StaticResource WindowBackgroundBrush}" />
|
Fill="{StaticResource WindowBackgroundBrush}"/>
|
||||||
<Viewbox Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2"
|
<Viewbox Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
@ -126,36 +126,5 @@
|
|||||||
<Run FontSize="15" Text="by" />
|
<Run FontSize="15" Text="by" />
|
||||||
<Run x:Name="AuthorTextRun" />
|
<Run x:Name="AuthorTextRun" />
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
<TextBlock Grid.Row="2" Grid.RowSpan="2" Grid.Column="1"
|
|
||||||
x:Name="DescriptionTextShadow"
|
|
||||||
Margin="-10,15,-5,15"
|
|
||||||
Padding="30,10"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
FontFamily="{StaticResource PrimaryFont}"
|
|
||||||
FontSize="16"
|
|
||||||
Style="{StaticResource BackgroundBlurStyle}"
|
|
||||||
TextAlignment="Right"
|
|
||||||
TextWrapping="Wrap">
|
|
||||||
<TextBlock.Effect>
|
|
||||||
<BlurEffect Radius="55" />
|
|
||||||
</TextBlock.Effect>
|
|
||||||
</TextBlock>
|
|
||||||
<TextBlock Grid.Row="2" Grid.RowSpan="2" Grid.Column="1"
|
|
||||||
x:Name="DescriptionTextBlock"
|
|
||||||
Margin="20,25,25,25"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
FontFamily="{StaticResource PrimaryFont}"
|
|
||||||
FontSize="16"
|
|
||||||
TextAlignment="Right"
|
|
||||||
TextWrapping="Wrap">
|
|
||||||
<TextBlock.Effect>
|
|
||||||
<DropShadowEffect />
|
|
||||||
</TextBlock.Effect>
|
|
||||||
</TextBlock>
|
|
||||||
<Rectangle Grid.Row="2" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="2"
|
|
||||||
x:Name="TextHoverTrigger"
|
|
||||||
Fill="Transparent" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</local:UserControlRx>
|
</local:UserControlRx>
|
||||||
|
@ -80,6 +80,7 @@ namespace Wabbajack
|
|||||||
.BindToStrict(this, x => x.AuthorShadowTextRun.Text)
|
.BindToStrict(this, x => x.AuthorShadowTextRun.Text)
|
||||||
.DisposeWith(dispose);
|
.DisposeWith(dispose);
|
||||||
|
|
||||||
|
/*
|
||||||
var descVisible = this.WhenAny(x => x.Description)
|
var descVisible = this.WhenAny(x => x.Description)
|
||||||
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
|
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
|
||||||
.Replay(1)
|
.Replay(1)
|
||||||
@ -96,6 +97,7 @@ namespace Wabbajack
|
|||||||
this.WhenAny(x => x.Description)
|
this.WhenAny(x => x.Description)
|
||||||
.BindToStrict(this, x => x.DescriptionTextShadow.Text)
|
.BindToStrict(this, x => x.DescriptionTextShadow.Text)
|
||||||
.DisposeWith(dispose);
|
.DisposeWith(dispose);
|
||||||
|
*/
|
||||||
|
|
||||||
var titleVisible = this.WhenAny(x => x.Title)
|
var titleVisible = this.WhenAny(x => x.Title)
|
||||||
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
|
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
Background="{StaticResource DarkBackgroundBrush}"
|
Background="{StaticResource DarkBackgroundBrush}"
|
||||||
Text="{Binding PickerVM.TargetPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource AbsolutePathToStringConverter}}"
|
Text="{Binding PickerVM.TargetPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource AbsolutePathToStringConverter}}"
|
||||||
Visibility="{Binding PickerVM.ShowTextBoxInput, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
/>
|
||||||
<Grid Grid.Column="1"
|
<Grid Grid.Column="1"
|
||||||
HorizontalAlignment="Right"
|
HorizontalAlignment="Right"
|
||||||
ClipToBounds="True">
|
ClipToBounds="True">
|
||||||
|
@ -18,27 +18,14 @@
|
|||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="4*" />
|
<RowDefinition Height="8*" />
|
||||||
<RowDefinition Height="*" MinHeight="150" />
|
<RowDefinition Height="*" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="5" />
|
<ColumnDefinition Width="1.8*" />
|
||||||
<ColumnDefinition Width="2*" />
|
|
||||||
<ColumnDefinition Width="5" />
|
|
||||||
<ColumnDefinition Width="5*" />
|
<ColumnDefinition Width="5*" />
|
||||||
<ColumnDefinition Width="5" />
|
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<Grid Grid.Row="0" Grid.Column="3">
|
<ScrollViewer Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
|
||||||
|
|
||||||
<local:DetailImageView x:Name="DetailImage" BorderThickness="0" />
|
|
||||||
</Grid>
|
|
||||||
<!-- Comes after image area so shadow can overlay -->
|
|
||||||
<!--
|
|
||||||
<local:TopProgressView Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" Grid.ColumnSpan="5"
|
|
||||||
x:Name="TopProgressBar"
|
|
||||||
OverhangShadow="False" />
|
|
||||||
-->
|
|
||||||
<ScrollViewer Grid.Row="0" Grid.Column="1"
|
|
||||||
x:Name="SettingsScrollViewer"
|
x:Name="SettingsScrollViewer"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
HorizontalScrollBarVisibility="Disabled"
|
HorizontalScrollBarVisibility="Disabled"
|
||||||
@ -187,73 +174,44 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ListBox.ItemTemplate>
|
</ListBox.ItemTemplate>
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
<Border Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5"
|
<Grid Grid.Row="0" Grid.Column="1">
|
||||||
x:Name="BottomBarBackground"
|
<local:DetailImageView x:Name="DetailImage" BorderThickness="0" Padding="16, 0, 0, 8" />
|
||||||
Margin="5"
|
|
||||||
Background="{StaticResource WindowBackgroundBrush}" />
|
|
||||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5"
|
|
||||||
MaxWidth="1000">
|
|
||||||
<Grid
|
|
||||||
x:Name="BottomCompilerSettingsGrid"
|
|
||||||
Margin="35,0,35,0"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
ClipToBounds="False">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Grid.ColumnDefinitions>
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
<ColumnDefinition Width="*" />
|
|
||||||
<ColumnDefinition Width="20" />
|
|
||||||
<ColumnDefinition Width="Auto" />
|
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
<local:MO2CompilerConfigView x:Name="CompilerConfigView" Grid.Row="1" Grid.Column="1" />
|
|
||||||
<local:BeginButton Grid.Row="0" Grid.RowSpan="3" Grid.Column="5"
|
|
||||||
x:Name="BeginButton" />
|
|
||||||
<icon:PackIconFontAwesome Grid.Row="2"
|
|
||||||
Grid.Column="5"
|
|
||||||
x:Name="ErrorSummaryIconGlow"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Foreground="{StaticResource WarningBrush}"
|
|
||||||
Kind="ExclamationTriangleSolid"
|
|
||||||
Opacity="0.6">
|
|
||||||
<icon:PackIconFontAwesome.Effect>
|
|
||||||
<BlurEffect Radius="15" />
|
|
||||||
</icon:PackIconFontAwesome.Effect>
|
|
||||||
</icon:PackIconFontAwesome>
|
|
||||||
<icon:PackIconFontAwesome Grid.Row="2"
|
|
||||||
Grid.Column="5"
|
|
||||||
x:Name="ErrorSummaryIcon"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
Foreground="{StaticResource WarningBrush}"
|
|
||||||
Kind="ExclamationTriangleSolid" />
|
|
||||||
</Grid>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="5"
|
<Grid Grid.Row="1" Grid.Column="1">
|
||||||
x:Name="MidCompilationGrid"
|
<Grid.RowDefinitions>
|
||||||
Margin="5">
|
<RowDefinition />
|
||||||
|
<RowDefinition />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="4*" />
|
|
||||||
<ColumnDefinition Width="5" />
|
|
||||||
<ColumnDefinition Width="3*" />
|
<ColumnDefinition Width="3*" />
|
||||||
|
<ColumnDefinition Width="*" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
<local:LogView x:Name="LogView" Grid.Column="0" />
|
<TextBlock
|
||||||
<local:CpuView Grid.Column="2"
|
HorizontalAlignment="Left"
|
||||||
x:Name="CpuView"
|
Margin="16, 0, 0, 8"
|
||||||
ViewModel="{Binding}" />
|
VerticalAlignment="Center"
|
||||||
<local:AttentionBorder x:Name="UserInterventionsControl" Grid.Column="2">
|
FontSize="14"
|
||||||
<Grid>
|
Text="Output Location"
|
||||||
<local:ConfirmationInterventionView DataContext="{Binding ActiveGlobalUserIntervention}" Visibility="{Binding ActiveGlobalUserIntervention, Converter={StaticResource IsTypeVisibilityConverter}, ConverterParameter={x:Type local:ConfirmationIntervention}}" />
|
TextAlignment="Center"
|
||||||
</Grid>
|
ToolTip="The folder to place the resulting modlist.wabbajack file" />
|
||||||
</local:AttentionBorder>
|
<local:FilePicker
|
||||||
<local:CompilationCompleteView Grid.Column="2"
|
Grid.Row="1"
|
||||||
x:Name="CompilationComplete"
|
x:Name="OutputLocation"
|
||||||
ViewModel="{Binding}" />
|
Margin="16, 0, 0, 0"
|
||||||
|
Height="30"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
FontSize="14"
|
||||||
|
ToolTip="The folder to place the resulting modlist.wabbajack file" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
x:Name="ContinueButton"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Grid.Column="1"
|
||||||
|
Style="{StaticResource WizardButtonStyle}"
|
||||||
|
Content="Continue">
|
||||||
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</rxui:ReactiveUserControl>
|
</rxui:ReactiveUserControl>
|
@ -29,17 +29,6 @@ namespace Wabbajack
|
|||||||
|
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(disposables =>
|
||||||
{
|
{
|
||||||
ViewModel.WhenAny(vm => vm.State)
|
|
||||||
.Select(x => x == CompilerState.Errored)
|
|
||||||
.BindToStrict(this, x => x.CompilationComplete.AttentionBorder.Failure)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAny(vm => vm.State)
|
|
||||||
.Select(x => x == CompilerState.Errored)
|
|
||||||
.Select(failed => $"Compilation {(failed ? "Failed" : "Complete")}")
|
|
||||||
.BindToStrict(this, x => x.CompilationComplete.TitleText.Text)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAny(vm => vm.ModListImageLocation.TargetPath)
|
ViewModel.WhenAny(vm => vm.ModListImageLocation.TargetPath)
|
||||||
.Where(i => i.FileExists())
|
.Where(i => i.FileExists())
|
||||||
.Select(i => (UIUtils.TryGetBitmapImageFromFile(i, out var img), img))
|
.Select(i => (UIUtils.TryGetBitmapImageFromFile(i, out var img), img))
|
||||||
@ -56,88 +45,6 @@ namespace Wabbajack
|
|||||||
ViewModel.WhenAny(vm => vm.Settings.ModListDescription)
|
ViewModel.WhenAny(vm => vm.Settings.ModListDescription)
|
||||||
.BindToStrict(this, view => view.DetailImage.Description);
|
.BindToStrict(this, view => view.DetailImage.Description);
|
||||||
|
|
||||||
CompilationComplete.GoToModlistButton.Command = ReactiveCommand.Create(() =>
|
|
||||||
{
|
|
||||||
UIUtils.OpenFolder(ViewModel.OutputLocation.TargetPath);
|
|
||||||
}).DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.BackCommand)
|
|
||||||
.BindToStrict(this, view => view.CompilationComplete.BackButton.Command)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
CompilationComplete.CloseWhenCompletedButton.Command = ReactiveCommand.Create(() =>
|
|
||||||
{
|
|
||||||
Environment.Exit(0);
|
|
||||||
}).DisposeWith(disposables);
|
|
||||||
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.ExecuteCommand)
|
|
||||||
.BindToStrict(this, view => view.BeginButton.Command)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.State)
|
|
||||||
.Select(v => v == CompilerState.Configuration ? Visibility.Visible : Visibility.Collapsed)
|
|
||||||
.BindToStrict(this, view => view.BottomCompilerSettingsGrid.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.State)
|
|
||||||
.Select(v => v != CompilerState.Configuration ? Visibility.Visible : Visibility.Collapsed)
|
|
||||||
.BindToStrict(this, view => view.LogView.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.State)
|
|
||||||
.Select(v => v == CompilerState.Compiling ? Visibility.Visible : Visibility.Collapsed)
|
|
||||||
.BindToStrict(this, view => view.CpuView.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.State)
|
|
||||||
.Select(v => v is CompilerState.Completed or CompilerState.Errored ? Visibility.Visible : Visibility.Collapsed)
|
|
||||||
.BindToStrict(this, view => view.CompilationComplete.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.ModlistLocation)
|
|
||||||
.BindToStrict(this, view => view.CompilerConfigView.ModListLocation.PickerVM)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.DownloadLocation)
|
|
||||||
.BindToStrict(this, view => view.CompilerConfigView.DownloadsLocation.PickerVM)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.Settings.Downloads)
|
|
||||||
.BindToStrict(this, view => view.CompilerConfigView.DownloadsLocation.PickerVM.TargetPath)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.OutputLocation)
|
|
||||||
.BindToStrict(this, view => view.CompilerConfigView.OutputLocation.PickerVM)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
ViewModel.WhenAnyValue(vm => vm.Settings.OutputFile)
|
|
||||||
.BindToStrict(this, view => view.CompilerConfigView.OutputLocation.PickerVM.TargetPath)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
UserInterventionsControl.Visibility = Visibility.Collapsed;
|
|
||||||
|
|
||||||
// Errors
|
|
||||||
this.WhenAnyValue(view => view.ViewModel.ErrorState)
|
|
||||||
.Select(x => !x.Failed)
|
|
||||||
.BindToStrict(this, view => view.BeginButton.IsEnabled)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
this.WhenAnyValue(view => view.ViewModel.ErrorState)
|
|
||||||
.Select(x => x.Failed ? Visibility.Visible : Visibility.Hidden)
|
|
||||||
.BindToStrict(this, view => view.ErrorSummaryIcon.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
this.WhenAnyValue(view => view.ViewModel.ErrorState)
|
|
||||||
.Select(x => x.Failed ? Visibility.Visible : Visibility.Hidden)
|
|
||||||
.BindToStrict(this, view => view.ErrorSummaryIconGlow.Visibility)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
this.WhenAnyValue(view => view.ViewModel.ErrorState)
|
|
||||||
.Select(x => x.Reason)
|
|
||||||
.BindToStrict(this, view => view.ErrorSummaryIcon.ToolTip)
|
|
||||||
.DisposeWith(disposables);
|
|
||||||
|
|
||||||
|
|
||||||
// Settings
|
// Settings
|
||||||
|
|
||||||
@ -177,6 +84,9 @@ namespace Wabbajack
|
|||||||
|
|
||||||
this.Bind(ViewModel, vm => vm.Settings.MachineUrl, view => view.MachineUrl.Text)
|
this.Bind(ViewModel, vm => vm.Settings.MachineUrl, view => view.MachineUrl.Text)
|
||||||
.DisposeWith(disposables);
|
.DisposeWith(disposables);
|
||||||
|
|
||||||
|
this.BindCommand(ViewModel, vm => vm.NextCommand, v => v.ContinueButton)
|
||||||
|
.DisposeWith(disposables);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
22
Wabbajack.App.Wpf/Views/Compiler/CompilerFileManager.xaml
Normal file
22
Wabbajack.App.Wpf/Views/Compiler/CompilerFileManager.xaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
<rxui:ReactiveUserControl
|
||||||
|
x:Class="Wabbajack.CompilerFileManagerView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:lib="clr-namespace:Wabbajack;assembly=Wabbajack"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:icon="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||||
|
xmlns:local="clr-namespace:Wabbajack"
|
||||||
|
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:rxui="http://reactiveui.net"
|
||||||
|
xmlns:wabbacommon="clr-namespace:Wabbajack.Common;assembly=Wabbajack.Common"
|
||||||
|
xmlns:controls1="clr-namespace:Wabbajack.ViewModels.Controls"
|
||||||
|
d:DataContext="{d:DesignInstance local:CompilerFileManagerVM}"
|
||||||
|
d:DesignHeight="450"
|
||||||
|
d:DesignWidth="800"
|
||||||
|
x:TypeArguments="local:CompilerFileManagerVM"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
</rxui:ReactiveUserControl>
|
39
Wabbajack.App.Wpf/Views/Compiler/CompilerFileManager.xaml.cs
Normal file
39
Wabbajack.App.Wpf/Views/Compiler/CompilerFileManager.xaml.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using System.Diagnostics.Eventing.Reader;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reactive.Disposables;
|
||||||
|
using System.Reactive.Linq;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Windows.Controls;
|
||||||
|
using ReactiveUI;
|
||||||
|
using System.Windows;
|
||||||
|
using System.Windows.Forms;
|
||||||
|
using DynamicData;
|
||||||
|
using Microsoft.WindowsAPICodePack.Dialogs;
|
||||||
|
using Wabbajack.Common;
|
||||||
|
using Wabbajack.Paths;
|
||||||
|
using Wabbajack.Paths.IO;
|
||||||
|
using Wabbajack.ViewModels.Controls;
|
||||||
|
using Wabbajack.Services.OSIntegrated;
|
||||||
|
|
||||||
|
namespace Wabbajack
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Interaction logic for CompilerFileManagerView.xaml
|
||||||
|
/// </summary>
|
||||||
|
public partial class CompilerFileManagerView : ReactiveUserControl<CompilerFileManagerVM>
|
||||||
|
{
|
||||||
|
public CompilerFileManagerView()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
|
||||||
|
/*
|
||||||
|
this.WhenActivated(disposables =>
|
||||||
|
{
|
||||||
|
});
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -47,18 +47,5 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
FontSize="14"
|
FontSize="14"
|
||||||
ToolTip="The folder where MO2 downloads your mods." />
|
ToolTip="The folder where MO2 downloads your mods." />
|
||||||
<TextBlock Grid.Row="2" Grid.Column="0"
|
|
||||||
HorizontalAlignment="Right"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="14"
|
|
||||||
Text="Output Location"
|
|
||||||
TextAlignment="Center"
|
|
||||||
ToolTip="The folder to place the resulting modlist.wabbajack file" />
|
|
||||||
<local:FilePicker Grid.Row="2" Grid.Column="2"
|
|
||||||
x:Name="OutputLocation"
|
|
||||||
Height="30"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
FontSize="14"
|
|
||||||
ToolTip="The folder to place the resulting modlist.wabbajack file" />
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
@ -67,7 +67,7 @@
|
|||||||
<None Remove="Resources\Wabba_Mouth.png" />
|
<None Remove="Resources\Wabba_Mouth.png" />
|
||||||
<None Remove="Resources\Wabba_Mouth_No_Text.png" />
|
<None Remove="Resources\Wabba_Mouth_No_Text.png" />
|
||||||
<None Remove="Resources\Wabba_Mouth_Small.png" />
|
<None Remove="Resources\Wabba_Mouth_Small.png" />
|
||||||
<Compile Remove="ViewModels\Compilers\VortexCompilerVM.cs" />
|
<Compile Remove="ViewModels\Compiler\VortexCompilerVM.cs" />
|
||||||
<Compile Remove="ViewModels\Installers\VortexInstallerVM.cs" />
|
<Compile Remove="ViewModels\Installers\VortexInstallerVM.cs" />
|
||||||
<None Update="Resources\libwebp_x64.dll">
|
<None Update="Resources\libwebp_x64.dll">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
Loading…
Reference in New Issue
Block a user