Added the Version to the manifest

This commit is contained in:
erri120 2020-04-16 17:54:26 +02:00
parent 545d258ce0
commit cba64a25a3
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135
3 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Linq;
using Wabbajack.Common;
using Wabbajack.Common.Serialization.Json;
@ -9,6 +10,7 @@ namespace Wabbajack.Lib
public class Manifest
{
public string Name;
public Version Version;
public string Author;
public string Description;
@ -28,6 +30,7 @@ namespace Wabbajack.Lib
public Manifest(ModList modlist)
{
Name = modlist.Name;
Version = modlist.Version;
Author = modlist.Author;
Description = modlist.Description;

View File

@ -24,7 +24,8 @@
</ScrollViewer.Resources>
<StackPanel Margin="8" x:Name="DynamicStackPanel">
<TextBlock x:Name="Name" FontSize="32" HorizontalAlignment="Center" Style="{StaticResource HeaderStyle}"/>
<TextBlock x:Name="Author" FontSize="14" Padding="0 12 0 3"/>
<TextBlock x:Name="Version" FontSize="14" Padding="0 12 0 3"/>
<TextBlock x:Name="Author" FontSize="14" Padding="0 3 0 3"/>
<TextBlock x:Name="Description" FontSize="18" TextWrapping="Wrap"/>
<TextBlock x:Name="InstallSize" Padding="0 24 0 0" FontSize="24"/>

View File

@ -20,8 +20,7 @@ namespace Wabbajack
Modlist = modlist;
var manifest = new Manifest(modlist);
if(ViewModel == null)
ViewModel = new ManifestVM(manifest);
ViewModel ??= new ManifestVM(manifest);
InitializeComponent();
@ -29,6 +28,8 @@ namespace Wabbajack
{
this.OneWayBind(ViewModel, x => x.Name, x => x.Name.Text)
.DisposeWith(disposable);
this.OneWayBind(ViewModel, x => x.Manifest.Version, x => x.Version.Text)
.DisposeWith(disposable);
this.OneWayBind(ViewModel, x => x.Author, x => x.Author.Text)
.DisposeWith(disposable);
this.OneWayBind(ViewModel, x => x.Description, x => x.Description.Text)