Wire in the settings page

This commit is contained in:
Timothy Baldridge 2021-09-28 16:50:40 -06:00
parent 44009c3d9c
commit 28417c39d3
3 changed files with 19 additions and 3 deletions

View File

@ -37,6 +37,9 @@ namespace Wabbajack.App.ViewModels
[Reactive]
public ReactiveCommand<Unit, Unit> BackButton { get; set; }
[Reactive]
public ReactiveCommand<Unit, Unit> SettingsButton { get; set; }
[Reactive]
public string ResourceStatus { get; set; }
@ -63,6 +66,12 @@ namespace Wabbajack.App.ViewModels
.Select(bc => bc.Value.Count() > 1))
.DisposeWith(disposables);
SettingsButton = ReactiveCommand.Create(() =>
{
Receive(new NavigateTo(typeof(SettingsViewModel)));
})
.DisposeWith(disposables);
});
Receive(new NavigateTo(typeof(ModeSelectionViewModel)));

View File

@ -34,16 +34,20 @@
</Design.DataContext>
<Grid RowDefinitions="40, *">
<Grid ColumnDefinitions="40, *, 40, 40">
<Grid ColumnDefinitions="40, *, 40, 40, 40">
<Button Grid.Column="0" x:Name="BackButton">
<i:MaterialIcon Kind="ArrowBack"> </i:MaterialIcon>
</Button>
<TextBlock Grid.Column="1" HorizontalAlignment="Right" VerticalAlignment="Center" x:Name="ResourceStatus"></TextBlock>
<Button Grid.Column="2" x:Name="MinimizeButton">
<Button Grid.Column="2" x:Name="SettingsButton">
<i:MaterialIcon Kind="Gear"></i:MaterialIcon>
</Button>
<Button Grid.Column="3" x:Name="MinimizeButton">
<i:MaterialIcon Kind="WindowMinimize" />
</Button>
<Button Grid.Column="3" x:Name="CloseButton">
<Button Grid.Column="4" x:Name="CloseButton">
<i:MaterialIcon Kind="Close"/>
</Button>

View File

@ -27,6 +27,9 @@ namespace Wabbajack.App.Views
this.BindCommand(ViewModel, vm => vm.BackButton, view => view.BackButton)
.DisposeWith(dispose);
this.BindCommand(ViewModel, vm => vm.SettingsButton, view => view.SettingsButton)
.DisposeWith(dispose);
this.Bind(ViewModel, vm => vm.CurrentScreen, view => view.Contents.Content)
.DisposeWith(dispose);