mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Implement compile complete view, hook up buttons and error alerts
This commit is contained in:
parent
653c83d7dd
commit
28e7e1f01a
@ -75,7 +75,8 @@
|
|||||||
<TextBlock Grid.Row="1"
|
<TextBlock Grid.Row="1"
|
||||||
x:Name="ActionText"
|
x:Name="ActionText"
|
||||||
Margin="0,10,0,0"
|
Margin="0,10,0,0"
|
||||||
HorizontalAlignment="Center" />
|
HorizontalAlignment="Center"
|
||||||
|
Text="Output Folder"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Grid.Row="1" Grid.Column="2"
|
<Grid Grid.Row="1" Grid.Column="2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics.Eventing.Reader;
|
using System;
|
||||||
|
using System.Diagnostics.Eventing.Reader;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Reactive.Disposables;
|
using System.Reactive.Disposables;
|
||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
@ -27,6 +28,30 @@ 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 => $"Installation {(failed ? "Failed" : "Complete")}")
|
||||||
|
.BindToStrict(this, x => x.CompilationComplete.TitleText.Text)
|
||||||
|
.DisposeWith(disposables);
|
||||||
|
|
||||||
|
CompilationComplete.GoToModlistButton.Command = ReactiveCommand.Create(() =>
|
||||||
|
{
|
||||||
|
UIUtils.OpenFolder(ViewModel.OutputLocation.TargetPath.Parent);
|
||||||
|
}).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)
|
ViewModel.WhenAnyValue(vm => vm.ExecuteCommand)
|
||||||
|
Loading…
Reference in New Issue
Block a user