Add Author property to Mod; More UI tweaks

This commit is contained in:
Joshua Askharoun
2021-04-26 18:05:19 -05:00
parent 7f2db257d1
commit d972d1f31b
5 changed files with 33 additions and 23 deletions
+2
View File
@@ -27,6 +27,8 @@ namespace ZuneModCore
public abstract string Description { get; }
public abstract string Author { get; }
public virtual Task Init() => Task.CompletedTask;
public abstract Task<string?> Apply();
+2
View File
@@ -16,6 +16,8 @@ namespace ZuneModCore.Mods
public override string Description => "Re-enables access to some features disabled by Microsoft, such as the Social and Marketplace tabs.\r\n" +
"Does not restore functionality of those features, but shows them in the software.";
public override string Author => "Unknown";
public override AbstractUIElementGroup OptionsUI => new(nameof(FeaturesOverrideMod))
{
Title = "Select features:",
+2
View File
@@ -15,6 +15,8 @@ namespace ZuneModCore.Mods
public override string Description =>
"Resolves \"Error C00D11CD\" when attempting to sync video to a Zune device using Windows 10 1607 (Anniversary Update) or newer";
public override string Author => "ส็็็Codix#4833";
public override string Id => nameof(VideoSyncMod);
public override AbstractUIElementGroup? OptionsUI => null;
+3 -5
View File
@@ -9,10 +9,6 @@ namespace ZuneModCore.Mods
{
public class WebservicesMod : Mod
{
private readonly byte[] ZUNE_4_8_VERSION_BYTES =
{
0x34, 0x2E, 0x38
};
private const int ZUNESERVICES_ENDPOINTS_BLOCK_OFFSET = 0x14D60;
private const int ZUNESERVICES_ENDPOINTS_BLOCK_LENGTH = 0x884;
@@ -23,6 +19,8 @@ namespace ZuneModCore.Mods
public override string Description => "Partially restores online features such as the Marketplace by patching the Zune desktop software " +
"to use the community's recreation of Microsoft's Zune servers at zunes.tk (instead of zune.net).";
public override string Author => "Joshua \"Yoshi\" Askharoun";
public override AbstractUIElementGroup? OptionsUI => null;
public override IReadOnlyList<Type>? DependentMods => null;
@@ -48,7 +46,7 @@ namespace ZuneModCore.Mods
// Verify that the DLL is from v4.8 (other versions not tested)
zsDllReader.BaseStream.Position = 0x12C824;
var versionBytes = zsDllReader.ReadBytes(ZUNE_4_8_VERSION_BYTES.Length * 2);
var versionBytes = zsDllReader.ReadBytes(6);
if (versionBytes[0] != '4' || versionBytes[2] != '.' || versionBytes[4] != '8')
{
return Task.FromResult<string?>("This mod has not been tested on versions earlier than 4.8.");
+13 -7
View File
@@ -29,12 +29,15 @@
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding Title}" FontWeight="SemiBold" FontSize="16" TextTrimming="CharacterEllipsis"/>
<TextBlock TextTrimming="CharacterEllipsis">
<Run Text="{Binding Title, Mode=OneWay}" FontWeight="SemiBold" FontSize="16"/>
<Run Text=" By "/><Run Text="{Binding Author, Mode=OneWay}"/>
</TextBlock>
<TextBlock Text="{Binding Description}" Grid.Row="1" FontSize="14" TextWrapping="Wrap"/>
<Button x:Name="ModResetButton" Grid.Column="1" Grid.RowSpan="2" VerticalAlignment="Center"
Click="ModResetButton_Click">
<mah:FontIcon Glyph="&#xE10E;" FontFamily="Segoe MDL2 Assets" />
<Button x:Name="ModResetButton" Grid.Column="1" Grid.RowSpan="3" VerticalAlignment="Center" Margin="8,0,0,0"
Click="ModResetButton_Click" ToolTip="Reset" Style="{StaticResource MahApps.Styles.Button.Square}">
<mah:FontIcon Glyph="&#xE10E;" FontFamily="Segoe MDL2 Assets" Margin="4" />
</Button>
</Grid>
<!--<Border Padding="8" Margin="8" Background="White">
@@ -48,7 +51,8 @@
</ListView.ItemTemplate>
</ListView>
<Grid Grid.Row="1">
<Border Grid.Row="1" BorderThickness="0,1,0,0" BorderBrush="{StaticResource MahApps.Brushes.Control.Border}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
@@ -58,11 +62,13 @@
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<TextBlock Text="Zune Software install directory:" FontSize="14" Margin="4,4,0,2"/>
<TextBlock Text="Zune Software install directory:" FontSize="14" Margin="4,4,0,2" />
<TextBox x:Name="ZuneInstallDirBox" Grid.Row="1" Margin="4,0,0,4"/>
<Button x:Name="InstallModsButton" Content="Install" ToolTip="Install selected mods" Click="InstallModsButton_Click"
Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="4,0,4,4"/>
Grid.Row="1" Grid.Column="1" VerticalAlignment="Stretch" HorizontalAlignment="Right" Margin="4,0,4,4"
Style="{StaticResource MahApps.Styles.Button.MetroSquare.Accent}"/>
</Grid>
</Border>
</Grid>
</mah:MetroWindow>