Some miswired properties

This commit is contained in:
Justin Swanson 2019-10-31 23:59:10 -05:00
parent 4f9b089a2b
commit 3b9cec7b5c
3 changed files with 13 additions and 19 deletions

View File

@ -44,9 +44,6 @@ namespace Wabbajack
private string _ModListPath;
public string ModListPath { get => _ModListPath; set => this.RaiseAndSetIfChanged(ref _ModListPath, value); }
private readonly ObservableAsPropertyHelper<string> _ModListName;
public string ModListName => _ModListName.Value;
private bool _UIReady;
public bool UIReady { get => _UIReady; set => this.RaiseAndSetIfChanged(ref _UIReady, value); }
@ -83,8 +80,8 @@ namespace Wabbajack
private readonly ObservableAsPropertyHelper<string> _AuthorText;
public string AuthorText => _AuthorText.Value;
private readonly ObservableAsPropertyHelper<string> _Summary;
public string Summary => _Summary.Value;
private readonly ObservableAsPropertyHelper<string> _Description;
public string Description => _Description.Value;
private readonly ObservableAsPropertyHelper<bool> _ShowTextShadow;
public bool ShowTextShadow => _ShowTextShadow.Value;
@ -140,9 +137,6 @@ namespace Wabbajack
this._HTMLReport = this.WhenAny(x => x.ModList)
.Select(modList => modList?.ReportHTML)
.ToProperty(this, nameof(this.HTMLReport));
this._ModListName = this.WhenAny(x => x.ModList)
.Select(modList => modList?.Name)
.ToProperty(this, nameof(this.ModListName));
this._ProgressPercent = Observable.CombineLatest(
this.WhenAny(x => x.Installing),
this.WhenAny(x => x.InstallingMode),
@ -212,23 +206,23 @@ namespace Wabbajack
resultSelector: (modList, slideshow, installing) => installing ? slideshow : modList)
.ToProperty(this, nameof(this.Image));
this._TitleText = Observable.CombineLatest(
this.WhenAny(x => x.ModListName),
this.WhenAny(x => x.ModList.Name),
this.WhenAny(x => x.Slideshow.ModName),
this.WhenAny(x => x.Installing),
resultSelector: (modList, mod, installing) => installing ? mod : modList)
.ToProperty(this, nameof(this.TitleText));
this._AuthorText = Observable.CombineLatest(
this.WhenAny(x => x.ModListName),
this.WhenAny(x => x.ModList.Author),
this.WhenAny(x => x.Slideshow.AuthorName),
this.WhenAny(x => x.Installing),
resultSelector: (modList, mod, installing) => installing ? mod : modList)
.ToProperty(this, nameof(this.AuthorText));
this._Summary = Observable.CombineLatest(
this.WhenAny(x => x.ModListName),
this.WhenAny(x => x.Slideshow.Summary),
this._Description = Observable.CombineLatest(
this.WhenAny(x => x.ModList.Description),
this.WhenAny(x => x.Slideshow.Description),
this.WhenAny(x => x.Installing),
resultSelector: (modList, mod, installing) => installing ? mod : modList)
.ToProperty(this, nameof(this.Summary));
.ToProperty(this, nameof(this.Description));
this._ShowTextShadow = this.WhenAny(x => x.Image)
.Select(image =>
@ -296,7 +290,7 @@ namespace Wabbajack
ms.Seek(0, SeekOrigin.Begin);
using (var reader = new StreamReader(ms))
{
var viewer = new TextViewer(reader.ReadToEnd(), this.ModListName);
var viewer = new TextViewer(reader.ReadToEnd(), this.ModList.Name);
viewer.Show();
}
}

View File

@ -54,8 +54,8 @@ namespace Wabbajack
private string _AuthorName = "Halgari & the Wabbajack Team";
public string AuthorName { get => _AuthorName; set => this.RaiseAndSetIfChanged(ref _AuthorName, value); }
private string _Summary;
public string Summary { get => _Summary; set => this.RaiseAndSetIfChanged(ref _Summary, value); }
private string _Description;
public string Description { get => _Description; set => this.RaiseAndSetIfChanged(ref _Description, value); }
private string _NexusSiteURL = "https://github.com/wabbajack-tools/wabbajack";
public string NexusSiteURL { get => _NexusSiteURL; set => this.RaiseAndSetIfChanged(ref _NexusSiteURL, value); }
@ -166,7 +166,7 @@ namespace Wabbajack
this.ModName = slide.ModName;
this.AuthorName = slide.ModAuthor;
this.Summary = slide.ModDescription;
this.Description = slide.ModDescription;
this.NexusSiteURL = slide.ModURL;
}

View File

@ -261,7 +261,7 @@
TextAlignment="Right"
Margin="20,25,25,25"
FontFamily="Lucida Sans"
Text="{Binding Summary}"
Text="{Binding Description}"
TextWrapping="Wrap" >
<TextBlock.Effect>
<DropShadowEffect />