Merge pull request #830 from Noggog/rxui-upgrade

RxUI upgrade
This commit is contained in:
Timothy Baldridge 2020-05-12 18:29:21 -07:00 committed by GitHub
commit ff028e82ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 101 additions and 77 deletions

View File

@ -3,7 +3,6 @@
* BA2s store file names as UTF8 instead of UTF7
* Check for a BSA file by header magic not by extension (allows .bsa.bak files to be extracted)
* Exclude the game `Data` directory from compilation
* Downgrade Rective.UI from 11.4.x to 11.3.8 due to UI breakage
#### Version - 2.0.4.3 - 5/10/2020
* Hotfix: tell the WJ CDN downloader to create the parent folder if it doesn't exist

View File

@ -6,8 +6,8 @@
<AssemblyName>wabbajack-cli</AssemblyName>
<Company>Wabbajack</Company>
<Platforms>x64</Platforms>
<AssemblyVersion>2.0.4.4</AssemblyVersion>
<FileVersion>2.0.4.4</FileVersion>
<AssemblyVersion>2.0.4.3</AssemblyVersion>
<FileVersion>2.0.4.3</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -32,7 +32,7 @@
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Octodiff" Version="1.2.1" />
<PackageReference Include="ReactiveUI" Version="11.3.8" />
<PackageReference Include="ReactiveUI" Version="11.4.1" />
<PackageReference Include="RocksDbNative" Version="6.2.2" />
<PackageReference Include="RocksDbSharp" Version="6.2.2" />
<PackageReference Include="SharpZipLib" Version="1.2.0" />

View File

@ -4,8 +4,8 @@
<OutputType>WinExe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<UseWPF>true</UseWPF>
<AssemblyVersion>2.0.4.4</AssemblyVersion>
<FileVersion>2.0.4.4</FileVersion>
<AssemblyVersion>2.0.4.3</AssemblyVersion>
<FileVersion>2.0.4.3</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Application Launcher</Description>
<PublishReadyToRun>true</PublishReadyToRun>

View File

@ -35,10 +35,10 @@
<Version>2.1.0</Version>
</PackageReference>
<PackageReference Include="ReactiveUI">
<Version>11.3.8</Version>
<Version>11.4.1</Version>
</PackageReference>
<PackageReference Include="ReactiveUI.Fody">
<Version>11.3.8</Version>
<Version>11.4.1</Version>
</PackageReference>
<PackageReference Include="SharpCompress">
<Version>0.25.0</Version>

View File

@ -3,8 +3,8 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyVersion>2.0.4.4</AssemblyVersion>
<FileVersion>2.0.4.4</FileVersion>
<AssemblyVersion>2.0.4.3</AssemblyVersion>
<FileVersion>2.0.4.3</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>Wabbajack Server</Description>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>

View File

@ -38,11 +38,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wabbajack.Launcher", "Wabba
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wabbajack.Common.Test", "Wabbajack.Common.Test\Wabbajack.Common.Test.csproj", "{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.App.Test", "Wabbajack.App.Test\Wabbajack.App.Test.csproj", "{44E30B97-D4A8-40A6-81D5-5CAB1F3D45CB}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wabbajack.App.Test", "Wabbajack.App.Test\Wabbajack.App.Test.csproj", "{44E30B97-D4A8-40A6-81D5-5CAB1F3D45CB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Server", "Wabbajack.Server\Wabbajack.Server.csproj", "{3E11B700-8405-433D-BF47-6C356087A7C2}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wabbajack.Server", "Wabbajack.Server\Wabbajack.Server.csproj", "{3E11B700-8405-433D-BF47-6C356087A7C2}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Wabbajack.Server.Test", "Wabbajack.Server.Test\Wabbajack.Server.Test.csproj", "{9DEC8DC8-B6E0-469B-9571-C4BAC0776D07}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Wabbajack.Server.Test", "Wabbajack.Server.Test\Wabbajack.Server.Test.csproj", "{9DEC8DC8-B6E0-469B-9571-C4BAC0776D07}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -53,74 +53,75 @@ Global
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Debug|Any CPU.ActiveCfg = Debug|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Debug|Any CPU.Build.0 = Debug|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Debug|x64.ActiveCfg = Debug|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Debug|x64.Build.0 = Debug|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Release|Any CPU.ActiveCfg = Release|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Release|x64.ActiveCfg = Release|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Release|x64.Build.0 = Release|x64
{B3F3FB6E-B9EB-4F49-9875-D78578BC7AE5}.Debug|Any CPU.Build.0 = Debug|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Debug|Any CPU.ActiveCfg = Debug|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Debug|Any CPU.Build.0 = Debug|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Debug|x64.ActiveCfg = Debug|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Debug|x64.Build.0 = Debug|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Release|Any CPU.ActiveCfg = Release|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Release|x64.ActiveCfg = Release|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Release|x64.Build.0 = Release|x64
{FF5D892F-8FF4-44FC-8F7F-CD58F307AD1B}.Debug|Any CPU.Build.0 = Debug|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|Any CPU.ActiveCfg = Debug|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|Any CPU.Build.0 = Debug|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|x64.ActiveCfg = Debug|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|x64.Build.0 = Debug|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|Any CPU.ActiveCfg = Release|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|x64.ActiveCfg = Release|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Release|x64.Build.0 = Release|x64
{0A820830-A298-497D-85E0-E9A89EFEF5FE}.Debug|Any CPU.Build.0 = Debug|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Debug|Any CPU.ActiveCfg = Debug|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Debug|Any CPU.Build.0 = Debug|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Debug|x64.ActiveCfg = Debug|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Debug|x64.Build.0 = Debug|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Release|Any CPU.ActiveCfg = Release|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Release|x64.ActiveCfg = Release|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Release|x64.Build.0 = Release|x64
{9E69BC98-1512-4977-B683-6E7E5292C0B8}.Debug|Any CPU.Build.0 = Debug|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Debug|Any CPU.ActiveCfg = Debug|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Debug|Any CPU.Build.0 = Debug|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Debug|x64.ActiveCfg = Debug|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Debug|x64.Build.0 = Debug|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Release|Any CPU.ActiveCfg = Release|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Release|x64.ActiveCfg = Release|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Release|x64.Build.0 = Release|x64
{5D6A2EAF-6604-4C51-8AE2-A746B4BC5E3E}.Debug|Any CPU.Build.0 = Debug|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Debug|Any CPU.ActiveCfg = Debug|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Debug|Any CPU.Build.0 = Debug|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Debug|x64.ActiveCfg = Debug|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Debug|x64.Build.0 = Debug|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Release|Any CPU.ActiveCfg = Release|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Release|x64.ActiveCfg = Release|x64
{6ED08CFB-B879-4B55-8741-663A4A3491CE}.Release|x64.Build.0 = Release|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Debug|Any CPU.ActiveCfg = Debug|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Debug|Any CPU.Build.0 = Debug|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Debug|x64.ActiveCfg = Debug|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Debug|x64.Build.0 = Debug|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Release|Any CPU.ActiveCfg = Release|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Release|x64.ActiveCfg = Release|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Release|x64.Build.0 = Release|x64
{89281BA1-67C8-48D2-9D6E-0F5CC85AD8C9}.Debug|Any CPU.Build.0 = Debug|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Debug|Any CPU.ActiveCfg = Debug|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Debug|Any CPU.Build.0 = Debug|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Debug|x64.ActiveCfg = Debug|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Debug|x64.Build.0 = Debug|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Release|Any CPU.ActiveCfg = Release|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Release|x64.ActiveCfg = Release|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Release|x64.Build.0 = Release|x64
{F72C17EC-0881-4455-8B0E-E1CC4FFD642E}.Debug|Any CPU.Build.0 = Debug|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Debug|Any CPU.ActiveCfg = Debug|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Debug|Any CPU.Build.0 = Debug|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Debug|x64.ActiveCfg = Debug|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Debug|x64.Build.0 = Debug|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Release|Any CPU.ActiveCfg = Release|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Release|x64.ActiveCfg = Release|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Release|x64.Build.0 = Release|x64
{81F87B8B-D5CE-4807-9005-38DE95BD7840}.Debug|Any CPU.Build.0 = Debug|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Debug|Any CPU.ActiveCfg = Debug|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Debug|Any CPU.Build.0 = Debug|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Debug|x64.ActiveCfg = Debug|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Debug|x64.Build.0 = Debug|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Release|Any CPU.ActiveCfg = Release|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Release|x64.ActiveCfg = Release|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Release|x64.Build.0 = Release|x64
{685D8BB1-D178-4D2C-85C7-C54A36FB7454}.Debug|Any CPU.Build.0 = Debug|x64
{D6856DBF-C959-4867-A8A8-343DA2D2715E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D6856DBF-C959-4867-A8A8-343DA2D2715E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D6856DBF-C959-4867-A8A8-343DA2D2715E}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -130,12 +131,12 @@ Global
{D6856DBF-C959-4867-A8A8-343DA2D2715E}.Release|x64.ActiveCfg = Release|Any CPU
{D6856DBF-C959-4867-A8A8-343DA2D2715E}.Release|x64.Build.0 = Release|Any CPU
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Debug|Any CPU.ActiveCfg = Debug|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Debug|Any CPU.Build.0 = Debug|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Debug|x64.ActiveCfg = Debug|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Debug|x64.Build.0 = Debug|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Release|Any CPU.ActiveCfg = Release|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Release|x64.ActiveCfg = Release|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Release|x64.Build.0 = Release|x64
{BA8A3E49-60D2-4BA2-B285-CB09FFDB6D32}.Debug|Any CPU.Build.0 = Debug|x64
{44E30B97-D4A8-40A6-81D5-5CAB1F3D45CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44E30B97-D4A8-40A6-81D5-5CAB1F3D45CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44E30B97-D4A8-40A6-81D5-5CAB1F3D45CB}.Debug|x64.ActiveCfg = Debug|Any CPU

View File

@ -24,8 +24,6 @@ namespace Wabbajack
public ObservableCollectionExtended<ModListMetadataVM> ModLists { get; } = new ObservableCollectionExtended<ModListMetadataVM>();
private int missingHashFallbackCounter;
private const string ALL_GAME_TYPE = "All";
public ICommand OnlyInstalledCheckedCommand { get; }

View File

@ -174,6 +174,7 @@ namespace Wabbajack
ProgressPercent = Percent.Zero;
using (var queue = new WorkQueue(1))
using (queue.Status.Select(i => i.ProgressPercent)
.ObserveOnGuiThread()
.Subscribe(percent => ProgressPercent = percent))
{
var tcs = new TaskCompletionSource<bool>();

View File

@ -43,9 +43,6 @@
</BeginStoryboard>
</DataTrigger.ExitActions>
</DataTrigger>
<DataTrigger Binding="{Binding Image}" Value="{x:Null}">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>
</Style>
</UserControl.Resources>
@ -74,9 +71,9 @@
HorizontalAlignment="Center"
VerticalAlignment="Center"
Stretch="UniformToFill">
<Image Source="{Binding Image, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<Image x:Name="ModlistImage" />
</Viewbox>
<Image
<Image x:Name="BadgeImage"
Grid.Row="0"
Grid.RowSpan="4"
Grid.Column="0"
@ -84,8 +81,7 @@
Width="60"
Height="60"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Source="{Binding Badge, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
VerticalAlignment="Top" />
<TextBlock
x:Name="TitleTextShadow"
Grid.Row="2"
@ -98,15 +94,13 @@
FontSize="65"
FontWeight="Bold"
Style="{StaticResource BackgroundBlurStyle}"
Text="{Binding Title, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding ShowTitle, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="WrapWithOverflow">
<TextBlock.Effect>
<BlurEffect Radius="85" />
</TextBlock.Effect>
</TextBlock>
<TextBlock
x:Name="ArtistTextShadow"
x:Name="AuthorTextShadow"
Grid.Row="3"
Grid.Column="0"
Margin="35,-10,-10,10"
@ -116,15 +110,14 @@
FontSize="30"
FontWeight="Bold"
Style="{StaticResource BackgroundBlurStyle}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding ShowAuthor, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="WrapWithOverflow">
<TextBlock.Effect>
<BlurEffect Radius="55" />
</TextBlock.Effect>
<Run FontSize="15" Text="by" />
<Run Text="{Binding Author, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<Run x:Name="AuthorShadowTextRun" />
</TextBlock>
<TextBlock
<TextBlock x:Name="TitleTextBlock"
Grid.Row="2"
Grid.Column="0"
Margin="20,25,20,0"
@ -133,27 +126,24 @@
FontFamily="Lucida Sans"
FontSize="65"
FontWeight="Bold"
Text="{Binding Title, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
TextWrapping="WrapWithOverflow"
Visibility="{Binding ShowTitle, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="WrapWithOverflow">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>
</TextBlock>
<TextBlock
<TextBlock x:Name="AuthorTextBlock"
Grid.Row="3"
Grid.Column="0"
Margin="55,0,20,20"
FontFamily="Lucida Sans"
FontSize="30"
FontWeight="Bold"
TextWrapping="Wrap"
Visibility="{Binding ShowAuthor, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>
<Run FontSize="15" Text="by" />
<Run Text="{Binding Author, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
<Run x:Name="AuthorTextRun" />
</TextBlock>
<TextBlock
x:Name="DescriptionTextShadow"
@ -167,15 +157,13 @@
FontFamily="Lucida Sans"
FontSize="16"
Style="{StaticResource BackgroundBlurStyle}"
Text="{Binding Description, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
TextAlignment="Right"
TextWrapping="Wrap"
Visibility="{Binding ShowDescription, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="Wrap">
<TextBlock.Effect>
<BlurEffect Radius="55" />
</TextBlock.Effect>
</TextBlock>
<TextBlock
<TextBlock x:Name="DescriptionTextBlock"
Grid.Row="2"
Grid.RowSpan="2"
Grid.Column="1"
@ -184,10 +172,8 @@
VerticalAlignment="Bottom"
FontFamily="Lucida Sans"
FontSize="16"
Text="{Binding Description, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}"
TextAlignment="Right"
TextWrapping="Wrap"
Visibility="{Binding ShowDescription, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}, Converter={StaticResource bool2VisibilityHiddenConverter}}">
TextWrapping="Wrap">
<TextBlock.Effect>
<DropShadowEffect />
</TextBlock.Effect>

View File

@ -22,7 +22,7 @@ namespace Wabbajack
set => SetValue(ImageProperty, value);
}
public static readonly DependencyProperty ImageProperty = DependencyProperty.Register(nameof(Image), typeof(ImageSource), typeof(DetailImageView),
new FrameworkPropertyMetadata(default(ImageSource)));
new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, WireNotifyPropertyChanged));
public ImageSource Badge
{
@ -30,7 +30,7 @@ namespace Wabbajack
set => SetValue(BadgeProperty, value);
}
public static readonly DependencyProperty BadgeProperty = DependencyProperty.Register(nameof(Badge), typeof(ImageSource), typeof(DetailImageView),
new FrameworkPropertyMetadata(default(ImageSource)));
new FrameworkPropertyMetadata(default(ImageSource), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, WireNotifyPropertyChanged));
public string Title
{
@ -56,34 +56,74 @@ namespace Wabbajack
public static readonly DependencyProperty DescriptionProperty = DependencyProperty.Register(nameof(Description), typeof(string), typeof(DetailImageView),
new FrameworkPropertyMetadata(default(string), FrameworkPropertyMetadataOptions.BindsTwoWayByDefault, WireNotifyPropertyChanged));
[Reactive]
public bool ShowAuthor { get; private set; }
[Reactive]
public bool ShowDescription { get; private set; }
[Reactive]
public bool ShowTitle { get; private set; }
public DetailImageView()
{
InitializeComponent();
this.WhenActivated(dispose =>
{
// Update textboxes
var authorVisible = this.WhenAny(x => x.Author)
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
.Replay(1)
.RefCount();
authorVisible
.BindToStrict(this, x => x.AuthorTextBlock.Visibility)
.DisposeWith(dispose);
authorVisible
.BindToStrict(this, x => x.AuthorTextShadow.Visibility)
.DisposeWith(dispose);
this.WhenAny(x => x.Author)
.Select(x => !string.IsNullOrWhiteSpace(x))
.Subscribe(x => ShowAuthor = x)
.BindToStrict(this, x => x.AuthorTextRun.Text)
.DisposeWith(dispose);
this.WhenAny(x => x.Author)
.BindToStrict(this, x => x.AuthorShadowTextRun.Text)
.DisposeWith(dispose);
var descVisible = this.WhenAny(x => x.Description)
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
.Replay(1)
.RefCount();
descVisible
.BindToStrict(this, x => x.DescriptionTextBlock.Visibility)
.DisposeWith(dispose);
descVisible
.BindToStrict(this, x => x.DescriptionTextShadow.Visibility)
.DisposeWith(dispose);
this.WhenAny(x => x.Description)
.Select(x => !string.IsNullOrWhiteSpace(x))
.Subscribe(x => ShowDescription = x)
.BindToStrict(this, x => x.DescriptionTextBlock.Text)
.DisposeWith(dispose);
this.WhenAny(x => x.Description)
.BindToStrict(this, x => x.DescriptionTextShadow.Text)
.DisposeWith(dispose);
var titleVisible = this.WhenAny(x => x.Title)
.Select(x => string.IsNullOrWhiteSpace(x) ? Visibility.Collapsed : Visibility.Visible)
.Replay(1)
.RefCount();
titleVisible
.BindToStrict(this, x => x.TitleTextBlock.Visibility)
.DisposeWith(dispose);
titleVisible
.BindToStrict(this, x => x.TitleTextShadow.Visibility)
.DisposeWith(dispose);
this.WhenAny(x => x.Title)
.Select(x => !string.IsNullOrWhiteSpace(x))
.Subscribe(x => ShowTitle = x)
.BindToStrict(this, x => x.TitleTextBlock.Text)
.DisposeWith(dispose);
this.WhenAny(x => x.Title)
.BindToStrict(this, x => x.TitleTextShadow.Text)
.DisposeWith(dispose);
// Update other items
this.WhenAny(x => x.Badge)
.BindToStrict(this, x => x.BadgeImage.Source)
.DisposeWith(dispose);
this.WhenAny(x => x.Image)
.BindToStrict(this, x => x.ModlistImage.Source)
.DisposeWith(dispose);
this.WhenAny(x => x.Image)
.Select(img => img == null ? Visibility.Hidden : Visibility.Visible)
.BindToStrict(this, x => x.Visibility)
.DisposeWith(dispose);
});
}

View File

@ -6,8 +6,8 @@
<UseWPF>true</UseWPF>
<Platforms>x64</Platforms>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<AssemblyVersion>2.0.4.4</AssemblyVersion>
<FileVersion>2.0.4.4</FileVersion>
<AssemblyVersion>2.0.4.3</AssemblyVersion>
<FileVersion>2.0.4.3</FileVersion>
<Copyright>Copyright © 2019-2020</Copyright>
<Description>An automated ModList installer</Description>
<PublishReadyToRun>true</PublishReadyToRun>
@ -52,7 +52,6 @@
<None Remove="Resources\Wabba_Mouth_Small.png" />
<Compile Remove="View Models\Compilers\VortexCompilerVM.cs" />
<Compile Remove="View Models\Installers\VortexInstallerVM.cs" />
<None Include="View Models\Installers\VortexInstallerVM.cs" />
</ItemGroup>
<ItemGroup>
@ -72,9 +71,9 @@
<PackageReference Include="MahApps.Metro.IconPacks" Version="4.0.0" />
<PackageReference Include="PInvoke.Gdi32" Version="0.6.6" />
<PackageReference Include="PInvoke.User32" Version="0.6.6" />
<PackageReference Include="ReactiveUI" Version="11.3.8" />
<PackageReference Include="ReactiveUI.Fody" Version="11.3.8" />
<PackageReference Include="ReactiveUI.WPF" Version="11.3.8" />
<PackageReference Include="ReactiveUI" Version="11.4.1" />
<PackageReference Include="ReactiveUI.Fody" Version="11.4.1" />
<PackageReference Include="ReactiveUI.WPF" Version="11.4.1" />
<PackageReference Include="SharpDX.DXGI" Version="4.2.0" />
<PackageReference Include="WindowsAPICodePack-Shell" Version="1.1.1" />
<PackageReference Include="WPFThemes.DarkBlend" Version="1.0.8" />