mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Move Resource usage display
This commit is contained in:
parent
7ab7565d16
commit
ec4586cd82
@ -67,6 +67,9 @@ namespace Wabbajack
|
||||
|
||||
[Reactive]
|
||||
public string ResourceStatus { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string AppName { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool UpdateAvailable { get; private set; }
|
||||
@ -130,6 +133,7 @@ namespace Wabbajack
|
||||
var fvi = FileVersionInfo.GetVersionInfo(assembly.Location);
|
||||
Consts.CurrentMinimumWabbajackVersion = Version.Parse(fvi.FileVersion);
|
||||
VersionDisplay = $"v{fvi.FileVersion}";
|
||||
AppName = "WABBAJACK " + VersionDisplay;
|
||||
_logger.LogInformation("Wabbajack Version: {FileVersion}", fvi.FileVersion);
|
||||
|
||||
Task.Run(() => _wjClient.SendMetric("started_wabbajack", fvi.FileVersion)).FireAndForget();
|
||||
|
@ -31,12 +31,19 @@
|
||||
<RowDefinition Height="*"></RowDefinition>
|
||||
<RowDefinition Height="Auto"></RowDefinition>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal">
|
||||
<TextBlock FontSize="16" Margin="0, 0, 8, 0">WABBAJACK 3.0.0</TextBlock>
|
||||
<Button Name="SettingsButton">
|
||||
<Grid Grid.Row="0" Margin="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="*"></ColumnDefinition>
|
||||
<ColumnDefinition Width="Auto"></ColumnDefinition>
|
||||
<ColumnDefinition Width="140"></ColumnDefinition>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" FontSize="16" Margin="0, 0, 8, 0" Name="AppName"></TextBlock>
|
||||
<TextBlock Grid.Column="1" Margin="5, 0" Name="ResourceUsage" HorizontalAlignment="Right"></TextBlock>
|
||||
<Button Grid.Column="2" Name="SettingsButton">
|
||||
<icon:Material Kind="Cog"></icon:Material>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
<ContentPresenter Grid.Row="1" Content="{Binding ActivePane}">
|
||||
<ContentPresenter.Resources>
|
||||
<DataTemplate DataType="{x:Type local:CompilerVM}">
|
||||
@ -62,7 +69,7 @@
|
||||
</DataTemplate>
|
||||
</ContentPresenter.Resources>
|
||||
</ContentPresenter>
|
||||
<TextBlock Grid.Row="1" Margin="5, 0" Name="ResourceUsage" HorizontalAlignment="Right"></TextBlock>
|
||||
|
||||
</Grid>
|
||||
|
||||
<mahapps:MetroWindow.RightWindowCommands>
|
||||
|
@ -119,15 +119,12 @@ namespace Wabbajack
|
||||
_logger.LogError(ex, "During Main Window Startup");
|
||||
Environment.Exit(-1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
vm.WhenAnyValue(vm => vm.ResourceStatus)
|
||||
.BindToStrict(this, view => view.ResourceUsage.Text);
|
||||
|
||||
vm.WhenAnyValue(vm => vm.ResourceStatus)
|
||||
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
|
||||
.BindToStrict(this, view => view.ResourceUsage.Visibility);*/
|
||||
|
||||
vm.WhenAnyValue(vm => vm.AppName)
|
||||
.BindToStrict(this, view => view.AppName.Text);
|
||||
|
||||
}
|
||||
|
||||
public void Init(MainWindowVM vm, MainSettings settings)
|
||||
|
Loading…
Reference in New Issue
Block a user