mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Improved top title bar configuration text
This commit is contained in:
parent
bebd898964
commit
6c4fbc8476
@ -60,6 +60,9 @@ namespace Wabbajack
|
||||
[Reactive]
|
||||
public ErrorResponse? Completed { get; set; }
|
||||
|
||||
private readonly ObservableAsPropertyHelper<string> _progressTitle;
|
||||
public string ProgressTitle => _progressTitle.Value;
|
||||
|
||||
public CompilerVM(MainWindowVM mainWindowVM)
|
||||
{
|
||||
MWVM = mainWindowVM;
|
||||
@ -247,6 +250,22 @@ namespace Wabbajack
|
||||
Process.Start("explorer.exe", OutputLocation.TargetPath);
|
||||
}
|
||||
});
|
||||
|
||||
_progressTitle = Observable.CombineLatest(
|
||||
this.WhenAny(x => x.Compiling),
|
||||
this.WhenAny(x => x.StartedCompilation),
|
||||
resultSelector: (compiling, started) =>
|
||||
{
|
||||
if (compiling)
|
||||
{
|
||||
return "Compiling";
|
||||
}
|
||||
else
|
||||
{
|
||||
return started ? "Compiled" : "Configuring";
|
||||
}
|
||||
})
|
||||
.ToProperty(this, nameof(ProgressTitle));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -281,8 +281,14 @@ namespace Wabbajack
|
||||
this.WhenAny(x => x.StartedInstallation),
|
||||
resultSelector: (installing, started) =>
|
||||
{
|
||||
if (!installing) return "Configuring";
|
||||
return started ? "Installing" : "Installed";
|
||||
if (installing)
|
||||
{
|
||||
return "Installing";
|
||||
}
|
||||
else
|
||||
{
|
||||
return started ? "Installed" : "Configuring";
|
||||
}
|
||||
})
|
||||
.ToProperty(this, nameof(ProgressTitle));
|
||||
|
||||
|
@ -77,7 +77,7 @@
|
||||
Grid.ColumnSpan="5"
|
||||
OverhangShadow="True"
|
||||
ProgressPercent="{Binding PercentCompleted}"
|
||||
StatePrefixTitle="Compiling" />
|
||||
StatePrefixTitle="{Binding ProgressTitle}" />
|
||||
<Button
|
||||
x:Name="BackButton"
|
||||
Grid.Row="0"
|
||||
|
Loading…
Reference in New Issue
Block a user