adding version to title and logs
This commit is contained in:
parent
52a283ad37
commit
37c7457026
@ -9,6 +9,8 @@
|
||||
<PackageIcon>icon.ico</PackageIcon>
|
||||
<ApplicationIcon>Assets\icon.ico</ApplicationIcon>
|
||||
<Configurations>Debug;Release;TEST</Configurations>
|
||||
<AssemblyVersion>2.2</AssemblyVersion>
|
||||
<FileVersion>2.2</FileVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -2,6 +2,7 @@
|
||||
using ReactiveUI;
|
||||
using Serilog;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
namespace SPTInstaller.ViewModels
|
||||
{
|
||||
@ -10,9 +11,20 @@ namespace SPTInstaller.ViewModels
|
||||
public RoutingState Router { get; } = new RoutingState();
|
||||
public ViewModelActivator Activator { get; } = new ViewModelActivator();
|
||||
|
||||
private string _title;
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
set => this.RaiseAndSetIfChanged(ref _title, value);
|
||||
}
|
||||
|
||||
public MainWindowViewModel()
|
||||
{
|
||||
Log.Information("========= LAUNCHER STARTED =========");
|
||||
string? version = Assembly.GetExecutingAssembly().GetName()?.Version?.ToString();
|
||||
|
||||
Title = $"SPT Installer {"v" + version ?? "--unknown version--"}";
|
||||
|
||||
Log.Information($"========= {Title} Started =========");
|
||||
Log.Information(Environment.OSVersion.VersionString);
|
||||
|
||||
Router.Navigate.Execute(new PreChecksViewModel(this));
|
||||
|
@ -27,7 +27,7 @@
|
||||
</Design.DataContext>
|
||||
|
||||
<Grid RowDefinitions="AUTO,*">
|
||||
<cc:TitleBar Title="SPT Installer"
|
||||
<cc:TitleBar Title="{Binding Title}"
|
||||
XButtonCommand="{Binding CloseCommand}"
|
||||
MinButtonCommand="{Binding MinimizeCommand}"
|
||||
/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user