Updated packages

This commit is contained in:
Yoshi Askharoun
2021-11-10 21:21:25 -06:00
parent 691b0667bc
commit 6bd36a292f
17 changed files with 80 additions and 80 deletions
+3 -3
View File
@@ -31,7 +31,7 @@ namespace ZuneModCore
public abstract string Author { get; }
public virtual AbstractUIElementGroup? GetDefaultOptionsUI() => null;
public virtual AbstractUICollection? GetDefaultOptionsUI() => null;
public virtual Task Init() => Task.CompletedTask;
@@ -39,8 +39,8 @@ namespace ZuneModCore
public abstract Task<string?> Reset();
private AbstractUIElementGroup? _OptionsUI;
public AbstractUIElementGroup? OptionsUI
private AbstractUICollection? _OptionsUI;
public AbstractUICollection? OptionsUI
{
get
{
+2 -2
View File
@@ -20,12 +20,12 @@ namespace ZuneModCore.Mods
public override string Author => "Joshua \"Yoshi\" Askharoun";
public override AbstractUIElementGroup? GetDefaultOptionsUI()
public override AbstractUICollection? GetDefaultOptionsUI()
{
return new(nameof(BackgroundImageMod))
{
Title = "Select background image:",
Items =
Items = new List<AbstractUIElement>
{
new AbstractTextBox("fileBox", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)),
}
+31 -31
View File
@@ -19,39 +19,39 @@ namespace ZuneModCore.Mods
public override string Author => "Rafael Rivera";
public override AbstractUIElementGroup? GetDefaultOptionsUI()
public override AbstractUICollection? GetDefaultOptionsUI()
{
return new(nameof(FeaturesOverrideMod))
{
Title = "Select features:",
Items =
Items = new List<AbstractUIElement>
{
// We don't know what some of these overrides do exactly, so hide them from the user.
// The ID is the name of the registry key, the label is the display name
new AbstractBooleanUIElement("Apps", "Apps"),
new AbstractBooleanUIElement("Art", "Art"),
new AbstractBooleanUIElement("Channels", "Channels"),
new AbstractBooleanUIElement("FirstLaunchIntroVideo", "First Launch Intro Video"),
new AbstractBooleanUIElement("Games", "Games"),
new AbstractBooleanUIElement("Marketplace", "Marketplace"),
new AbstractBooleanUIElement("MBRPreview", "[Marketplace] Media Preview"),
new AbstractBooleanUIElement("MBRPurchase", "[Marketplace] Media Purchase"),
new AbstractBooleanUIElement("MBRRental", "[Marketplace] Media Rental"),
new AbstractBooleanUIElement("Music", "Music"),
new AbstractBooleanUIElement("MusicVideos", "Music Videos"),
new AbstractBooleanUIElement("Nowplaying", "Now Playing"),
new AbstractBooleanUIElement("NowplayingArt", "Now Playing Art"),
new AbstractBooleanUIElement("Picks", "Picks"),
new AbstractBooleanUIElement("Podcasts", "Podcasts"),
new AbstractBooleanUIElement("QuickMixLocal", "Quick Mix (Local)"),
new AbstractBooleanUIElement("QuickMixZMP", "Quick Mix (ZMP)"),
new AbstractBooleanUIElement("Quickplay", "Quickplay"),
new AbstractBooleanUIElement("Sign In Available", "Sign In"),
new AbstractBooleanUIElement("Social", "Social"),
new AbstractBooleanUIElement("SocialMarketplace", "Social Marketplace"),
new AbstractBooleanUIElement("SubscriptionFreeTracks", "Subscription Free Tracks"),
new AbstractBooleanUIElement("Videos", "Videos"),
new AbstractBoolean("Apps", "Apps"),
new AbstractBoolean("Art", "Art"),
new AbstractBoolean("Channels", "Channels"),
new AbstractBoolean("FirstLaunchIntroVideo", "First Launch Intro Video"),
new AbstractBoolean("Games", "Games"),
new AbstractBoolean("Marketplace", "Marketplace"),
new AbstractBoolean("MBRPreview", "[Marketplace] Media Preview"),
new AbstractBoolean("MBRPurchase", "[Marketplace] Media Purchase"),
new AbstractBoolean("MBRRental", "[Marketplace] Media Rental"),
new AbstractBoolean("Music", "Music"),
new AbstractBoolean("MusicVideos", "Music Videos"),
new AbstractBoolean("Nowplaying", "Now Playing"),
new AbstractBoolean("NowplayingArt", "Now Playing Art"),
new AbstractBoolean("Picks", "Picks"),
new AbstractBoolean("Podcasts", "Podcasts"),
new AbstractBoolean("QuickMixLocal", "Quick Mix (Local)"),
new AbstractBoolean("QuickMixZMP", "Quick Mix (ZMP)"),
new AbstractBoolean("Quickplay", "Quickplay"),
new AbstractBoolean("Sign In Available", "Sign In"),
new AbstractBoolean("Social", "Social"),
new AbstractBoolean("SocialMarketplace", "Social Marketplace"),
new AbstractBoolean("SubscriptionFreeTracks", "Subscription Free Tracks"),
new AbstractBoolean("Videos", "Videos"),
}
};
}
@@ -62,10 +62,10 @@ namespace ZuneModCore.Mods
{
foreach (AbstractUIElement uiElem in OptionsUI.Items)
{
if (uiElem is AbstractBooleanUIElement boolElem)
if (uiElem is AbstractBoolean boolElem)
{
bool? featureOverride = GetFeatureOverride(boolElem.Id);
boolElem.ChangeState(featureOverride ?? false);
boolElem.State = featureOverride ?? false;
}
}
@@ -77,9 +77,9 @@ namespace ZuneModCore.Mods
public async Task<string?> Apply(bool applyAll = false)
{
// Use user choices from AbstractUI
foreach (AbstractUIElement uiElem in OptionsUI.Items)
foreach (AbstractUIElement uiElem in OptionsUI!.Items)
{
if (uiElem is AbstractBooleanUIElement boolElem && (boolElem.State || applyAll))
if (uiElem is AbstractBoolean boolElem && (boolElem.State || applyAll))
{
bool isSuccess = SetFeatureOverride(boolElem.Id, true);
if (!isSuccess)
@@ -103,8 +103,8 @@ namespace ZuneModCore.Mods
public override async Task<string?> Reset()
{
foreach (AbstractUIElement uiElem in OptionsUI.Items)
if (uiElem is AbstractBooleanUIElement boolElem)
foreach (AbstractUIElement uiElem in OptionsUI!.Items)
if (uiElem is AbstractBoolean boolElem)
ResetFeatureOverride(boolElem.Id);
return null;
+5 -5
View File
@@ -24,15 +24,15 @@ namespace ZuneModCore.Mods
public override string Author => "Joshua \"Yoshi\" Askharoun";
public override AbstractUIElementGroup? GetDefaultOptionsUI()
public override AbstractUICollection? GetDefaultOptionsUI()
{
return new(nameof(MbidLocatorMod))
{
Title = "Select music folder:",
Items =
Items = new List<AbstractUIElement>
{
new AbstractTextBox("folderBox", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)),
new AbstractBooleanUIElement("recursiveBox", "Search recursively")
new AbstractBoolean("recursiveBox", "Search recursively")
}
};
}
@@ -42,8 +42,8 @@ namespace ZuneModCore.Mods
public override async Task<string?> Apply()
{
// Use user choices from AbstractUI
string folderPath = ((AbstractTextBox)OptionsUI.Items[0]).Value;
bool recursive = ((AbstractBooleanUIElement)OptionsUI.Items[1]).State;
string folderPath = ((AbstractTextBox)OptionsUI!.Items[0]).Value;
bool recursive = ((AbstractBoolean)OptionsUI.Items[1]).State;
string errorString = string.Empty;
// Verify that the folder exists
+2 -2
View File
@@ -21,12 +21,12 @@ namespace ZuneModCore.Mods
public override string Author => "Joshua \"Yoshi\" Askharoun";
public override AbstractUIElementGroup? GetDefaultOptionsUI()
public override AbstractUICollection? GetDefaultOptionsUI()
{
return new(nameof(FeaturesOverrideMod))
{
Title = string.Empty,
Items =
Items = new List<AbstractUIElement>
{
new AbstractTextBox("hostBox", "zunes.me", "zune.net")
{
+1 -1
View File
@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Include="OwlCore" Version="0.0.21" />
<PackageReference Include="OwlCore" Version="0.0.31" />
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageReference Include="TagLibSharp" Version="2.2.0" />
<PackageReference Include="Vestris.ResourceLib" Version="2.1.0" />