mirror of
https://github.com/ZuneDev/ZuneModdingHelper.git
synced 2026-07-27 13:12:21 -07:00
Update packages
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using OwlCore.AbstractUI.ViewModels;
|
using OwlCore.AbstractUI.ViewModels;
|
||||||
using Microsoft.Toolkit.Diagnostics;
|
using CommunityToolkit.Diagnostics;
|
||||||
using OwlCore.AbstractUI.Models;
|
using OwlCore.AbstractUI.Models;
|
||||||
using OwlCore.Wpf.Extensions;
|
using OwlCore.Wpf.Extensions;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractBooleanStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractBooleanStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractButtonStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractButtonStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
||||||
xmlns:local="clr-namespace:OwlCore.Wpf.AbstractUI.Themes">
|
xmlns:local="clr-namespace:OwlCore.Wpf.AbstractUI.Themes">
|
||||||
|
|||||||
@@ -1,12 +1,8 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
|
||||||
using OwlCore.AbstractUI.Models;
|
using OwlCore.AbstractUI.Models;
|
||||||
using OwlCore.AbstractUI.ViewModels;
|
using OwlCore.AbstractUI.ViewModels;
|
||||||
using Microsoft.Toolkit.Diagnostics;
|
using CommunityToolkit.Diagnostics;
|
||||||
using OwlCore.Wpf.AbstractUI.Controls;
|
|
||||||
using System.Windows.Data;
|
using System.Windows.Data;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractDataListStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractDataListStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes"
|
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using OwlCore.AbstractUI.ViewModels;
|
using OwlCore.AbstractUI.ViewModels;
|
||||||
using Microsoft.Toolkit.Diagnostics;
|
using CommunityToolkit.Diagnostics;
|
||||||
using OwlCore.AbstractUI.Models;
|
using OwlCore.AbstractUI.Models;
|
||||||
|
|
||||||
namespace OwlCore.Wpf.AbstractUI.Themes
|
namespace OwlCore.Wpf.AbstractUI.Themes
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using OwlCore.AbstractUI.ViewModels;
|
using OwlCore.AbstractUI.ViewModels;
|
||||||
using Microsoft.Toolkit.Diagnostics;
|
using CommunityToolkit.Diagnostics;
|
||||||
using OwlCore.AbstractUI.Models;
|
using OwlCore.AbstractUI.Models;
|
||||||
|
|
||||||
namespace OwlCore.Wpf.AbstractUI.Themes
|
namespace OwlCore.Wpf.AbstractUI.Themes
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractMultiChoiceUIElementStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractMultiChoiceUIElementStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
||||||
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes">
|
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes">
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractProgressUIElementStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractProgressUIElementStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractRichTextBlockStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractRichTextBlockStyle"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
||||||
|
|
||||||
<ResourceDictionary.MergedDictionaries>
|
<ResourceDictionary.MergedDictionaries>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractTextBoxStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractTextBoxStyle"
|
||||||
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
xmlns:behaviors="http://schemas.microsoft.com/xaml/behaviors"
|
||||||
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUI="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls">
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractUIGroupPresenterStyle"
|
x:Class="OwlCore.Wpf.AbstractUI.Themes.AbstractUIGroupPresenterStyle"
|
||||||
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
xmlns:controls="clr-namespace:OwlCore.Wpf.AbstractUI.Controls"
|
||||||
xmlns:abstractUIVm="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore"
|
xmlns:abstractUIVm="clr-namespace:OwlCore.AbstractUI.ViewModels;assembly=OwlCore.AbstractUI"
|
||||||
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes"
|
xmlns:themes="clr-namespace:OwlCore.Wpf.AbstractUI.Themes"
|
||||||
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible">
|
xmlns:convertvis="clr-namespace:OwlCore.Wpf.Converters.Bools.Visible">
|
||||||
|
|
||||||
|
|||||||
@@ -7,13 +7,14 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="CommunityToolkit.Diagnostics" Version="7.1.2" />
|
<PackageReference Include="CommunityToolkit.Diagnostics" Version="8.2.2" />
|
||||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
|
||||||
<PackageReference Include="OwlCore" Version="0.0.43" />
|
<PackageReference Include="OwlCore" Version="0.4.1" />
|
||||||
|
<PackageReference Include="OwlCore.AbstractUI" Version="0.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Folder Include="Converters\Bools\" />
|
<Folder Include="Converters\Bools\" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Reflection;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Vestris.ResourceLib;
|
using Vestris.ResourceLib;
|
||||||
using ZuneModCore.Win32;
|
using ZuneModCore.Win32;
|
||||||
@@ -22,21 +21,19 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
public override AbstractUICollection? GetDefaultOptionsUI()
|
public override AbstractUICollection? GetDefaultOptionsUI()
|
||||||
{
|
{
|
||||||
return new(nameof(BackgroundImageMod))
|
AbstractUICollection optionsUi = new(nameof(BackgroundImageMod))
|
||||||
{
|
{
|
||||||
Title = "Select background image:",
|
new AbstractTextBox("fileBox", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)),
|
||||||
Items = new List<AbstractUIElement>
|
|
||||||
{
|
|
||||||
new AbstractTextBox("fileBox", Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)),
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
optionsUi.Title = "Select background image:";
|
||||||
|
return optionsUi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IReadOnlyList<Type>? DependentMods => null;
|
public override IReadOnlyList<Type>? DependentMods => null;
|
||||||
|
|
||||||
public override async Task<string?> Apply()
|
public override async Task<string?> Apply()
|
||||||
{
|
{
|
||||||
string bgimgPath = ((AbstractTextBox)OptionsUI!.Items[0]).Value;
|
string bgimgPath = ((AbstractTextBox)OptionsUI![0]).Value;
|
||||||
FileInfo bgimgInfo = new(bgimgPath);
|
FileInfo bgimgInfo = new(bgimgPath);
|
||||||
if (!bgimgInfo.Exists)
|
if (!bgimgInfo.Exists)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,46 +21,44 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
public override AbstractUICollection? GetDefaultOptionsUI()
|
public override AbstractUICollection? GetDefaultOptionsUI()
|
||||||
{
|
{
|
||||||
return new(nameof(FeaturesOverrideMod))
|
AbstractUICollection optionsUi = new(nameof(FeaturesOverrideMod))
|
||||||
{
|
{
|
||||||
Title = "Select features:",
|
// We don't know what some of these overrides do exactly, so hide them from the user.
|
||||||
Items = new List<AbstractUIElement>
|
// The ID is the name of the registry key, the label is the display name
|
||||||
{
|
|
||||||
// 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 AbstractBoolean("Apps", "Apps"),
|
new AbstractBoolean("Apps", "Apps"),
|
||||||
new AbstractBoolean("Art", "Art"),
|
new AbstractBoolean("Art", "Art"),
|
||||||
new AbstractBoolean("Channels", "Channels"),
|
new AbstractBoolean("Channels", "Channels"),
|
||||||
new AbstractBoolean("FirstLaunchIntroVideo", "First Launch Intro Video"),
|
new AbstractBoolean("FirstLaunchIntroVideo", "First Launch Intro Video"),
|
||||||
new AbstractBoolean("Games", "Games"),
|
new AbstractBoolean("Games", "Games"),
|
||||||
new AbstractBoolean("Marketplace", "Marketplace"),
|
new AbstractBoolean("Marketplace", "Marketplace"),
|
||||||
new AbstractBoolean("MBRPreview", "[Marketplace] Media Preview"),
|
new AbstractBoolean("MBRPreview", "[Marketplace] Media Preview"),
|
||||||
new AbstractBoolean("MBRPurchase", "[Marketplace] Media Purchase"),
|
new AbstractBoolean("MBRPurchase", "[Marketplace] Media Purchase"),
|
||||||
new AbstractBoolean("MBRRental", "[Marketplace] Media Rental"),
|
new AbstractBoolean("MBRRental", "[Marketplace] Media Rental"),
|
||||||
new AbstractBoolean("Music", "Music"),
|
new AbstractBoolean("Music", "Music"),
|
||||||
new AbstractBoolean("MusicVideos", "Music Videos"),
|
new AbstractBoolean("MusicVideos", "Music Videos"),
|
||||||
new AbstractBoolean("Nowplaying", "Now Playing"),
|
new AbstractBoolean("Nowplaying", "Now Playing"),
|
||||||
new AbstractBoolean("NowplayingArt", "Now Playing Art"),
|
new AbstractBoolean("NowplayingArt", "Now Playing Art"),
|
||||||
new AbstractBoolean("Picks", "Picks"),
|
new AbstractBoolean("Picks", "Picks"),
|
||||||
new AbstractBoolean("Podcasts", "Podcasts"),
|
new AbstractBoolean("Podcasts", "Podcasts"),
|
||||||
new AbstractBoolean("QuickMixLocal", "Quick Mix (Local)"),
|
new AbstractBoolean("QuickMixLocal", "Quick Mix (Local)"),
|
||||||
new AbstractBoolean("QuickMixZMP", "Quick Mix (ZMP)"),
|
new AbstractBoolean("QuickMixZMP", "Quick Mix (ZMP)"),
|
||||||
new AbstractBoolean("Quickplay", "Quickplay"),
|
new AbstractBoolean("Quickplay", "Quickplay"),
|
||||||
new AbstractBoolean("Sign In Available", "Sign In"),
|
new AbstractBoolean("Sign In Available", "Sign In"),
|
||||||
new AbstractBoolean("Social", "Social"),
|
new AbstractBoolean("Social", "Social"),
|
||||||
new AbstractBoolean("SocialMarketplace", "Social Marketplace"),
|
new AbstractBoolean("SocialMarketplace", "Social Marketplace"),
|
||||||
new AbstractBoolean("SubscriptionFreeTracks", "Subscription Free Tracks"),
|
new AbstractBoolean("SubscriptionFreeTracks", "Subscription Free Tracks"),
|
||||||
new AbstractBoolean("Videos", "Videos"),
|
new AbstractBoolean("Videos", "Videos"),
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
optionsUi.Title = "Select features:";
|
||||||
|
return optionsUi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IReadOnlyList<Type>? DependentMods => null;
|
public override IReadOnlyList<Type>? DependentMods => null;
|
||||||
|
|
||||||
public override Task Init()
|
public override Task Init()
|
||||||
{
|
{
|
||||||
foreach (AbstractUIElement uiElem in OptionsUI.Items)
|
foreach (AbstractUIElement uiElem in OptionsUI!)
|
||||||
{
|
{
|
||||||
if (uiElem is AbstractBoolean boolElem)
|
if (uiElem is AbstractBoolean boolElem)
|
||||||
{
|
{
|
||||||
@@ -77,7 +75,7 @@ namespace ZuneModCore.Mods
|
|||||||
public async Task<string?> Apply(bool applyAll = false)
|
public async Task<string?> Apply(bool applyAll = false)
|
||||||
{
|
{
|
||||||
// Use user choices from AbstractUI
|
// Use user choices from AbstractUI
|
||||||
foreach (AbstractUIElement uiElem in OptionsUI!.Items)
|
foreach (AbstractUIElement uiElem in OptionsUI!)
|
||||||
{
|
{
|
||||||
if (uiElem is AbstractBoolean boolElem && (boolElem.State || applyAll))
|
if (uiElem is AbstractBoolean boolElem && (boolElem.State || applyAll))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -31,15 +31,13 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
public override AbstractUICollection? GetDefaultOptionsUI()
|
public override AbstractUICollection? GetDefaultOptionsUI()
|
||||||
{
|
{
|
||||||
return new(nameof(MbidLocatorMod))
|
AbstractUICollection optionsUi = new(nameof(MbidLocatorMod))
|
||||||
{
|
{
|
||||||
Title = "Select music folder:",
|
new AbstractTextBox("folderBox", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)),
|
||||||
Items = new List<AbstractUIElement>
|
new AbstractBoolean("recursiveBox", "Search recursively")
|
||||||
{
|
|
||||||
new AbstractTextBox("folderBox", Environment.GetFolderPath(Environment.SpecialFolder.MyMusic)),
|
|
||||||
new AbstractBoolean("recursiveBox", "Search recursively")
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
optionsUi.Title = "Select music folder:";
|
||||||
|
return optionsUi;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override IReadOnlyList<Type>? DependentMods => null;
|
public override IReadOnlyList<Type>? DependentMods => null;
|
||||||
@@ -47,8 +45,8 @@ namespace ZuneModCore.Mods
|
|||||||
public override async Task<string?> Apply()
|
public override async Task<string?> Apply()
|
||||||
{
|
{
|
||||||
// Use user choices from AbstractUI
|
// Use user choices from AbstractUI
|
||||||
string folderPath = ((AbstractTextBox)OptionsUI!.Items[0]).Value;
|
string folderPath = ((AbstractTextBox)OptionsUI![0]).Value;
|
||||||
bool recursive = ((AbstractBoolean)OptionsUI.Items[1]).State;
|
bool recursive = ((AbstractBoolean)OptionsUI[1]).State;
|
||||||
string errorString = string.Empty;
|
string errorString = string.Empty;
|
||||||
|
|
||||||
// Verify that the folder exists
|
// Verify that the folder exists
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using OwlCore;
|
using OwlCore.AbstractUI.Models;
|
||||||
using OwlCore.AbstractUI.Models;
|
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
@@ -32,39 +31,37 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
public override AbstractUICollection? GetDefaultOptionsUI()
|
public override AbstractUICollection? GetDefaultOptionsUI()
|
||||||
{
|
{
|
||||||
return new(nameof(FeaturesOverrideMod))
|
AbstractUICollection optionsUi = new(nameof(FeaturesOverrideMod))
|
||||||
{
|
{
|
||||||
Title = string.Empty,
|
new AbstractTextBox("hostBox", string.Empty, "zune.net")
|
||||||
Items = new List<AbstractUIElement>
|
|
||||||
{
|
{
|
||||||
new AbstractTextBox("hostBox", string.Empty, "zune.net")
|
Title = "Host",
|
||||||
|
TooltipText = "The host where the replacement servers are located. Must be the same length as \"zune.net\"."
|
||||||
|
},
|
||||||
|
new AbstractDataList("hostsTest", new List<AbstractUIMetadata>()
|
||||||
{
|
{
|
||||||
Title = "Host",
|
GetWebserviceAvailabilityUI("Main website", "www"),
|
||||||
TooltipText = "The host where the replacement servers are located. Must be the same length as \"zune.net\"."
|
GetWebserviceAvailabilityUI("Social website", "social"),
|
||||||
},
|
GetWebserviceAvailabilityUI("Catalog", "catalog"),
|
||||||
new AbstractDataList("hostsTest", new List<AbstractUIMetadata>()
|
GetWebserviceAvailabilityUI("Image catalog", "image.catalog"),
|
||||||
{
|
GetWebserviceAvailabilityUI("Social", "socialapi"),
|
||||||
GetWebserviceAvailabilityUI("Main website", "www"),
|
GetWebserviceAvailabilityUI("Social [Comments]", "comments"),
|
||||||
GetWebserviceAvailabilityUI("Social website", "social"),
|
GetWebserviceAvailabilityUI("Social [Inbox]", "inbox"),
|
||||||
GetWebserviceAvailabilityUI("Catalog", "catalog"),
|
GetWebserviceAvailabilityUI("Commerce [Sign in]", "commerce"),
|
||||||
GetWebserviceAvailabilityUI("Image catalog", "image.catalog"),
|
GetWebserviceAvailabilityUI("Mix", "mix"),
|
||||||
GetWebserviceAvailabilityUI("Social", "socialapi"),
|
GetWebserviceAvailabilityUI("Resources [Firmware]", "resources"),
|
||||||
GetWebserviceAvailabilityUI("Social [Comments]", "comments"),
|
GetWebserviceAvailabilityUI("Statistics", "stats"),
|
||||||
GetWebserviceAvailabilityUI("Social [Inbox]", "inbox"),
|
|
||||||
GetWebserviceAvailabilityUI("Commerce [Sign in]", "commerce"),
|
|
||||||
GetWebserviceAvailabilityUI("Mix", "mix"),
|
|
||||||
GetWebserviceAvailabilityUI("Resources [Firmware]", "resources"),
|
|
||||||
GetWebserviceAvailabilityUI("Statistics", "stats"),
|
|
||||||
}
|
|
||||||
)
|
|
||||||
{
|
|
||||||
Title = "Availability",
|
|
||||||
Subtitle = "Tests availability of each known web service on the new host.",
|
|
||||||
IsUserEditingEnabled = false,
|
|
||||||
PreferredDisplayMode = AbstractDataListPreferredDisplayMode.Grid,
|
|
||||||
}
|
}
|
||||||
|
)
|
||||||
|
{
|
||||||
|
Title = "Availability",
|
||||||
|
Subtitle = "Tests availability of each known web service on the new host.",
|
||||||
|
IsUserEditingEnabled = false,
|
||||||
|
PreferredDisplayMode = AbstractDataListPreferredDisplayMode.Grid,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
optionsUi.Title = string.Empty;
|
||||||
|
return optionsUi;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static AbstractUIMetadata GetWebserviceAvailabilityUI(string name, string subDomain)
|
private static AbstractUIMetadata GetWebserviceAvailabilityUI(string name, string subDomain)
|
||||||
@@ -80,7 +77,7 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
public override Task Init()
|
public override Task Init()
|
||||||
{
|
{
|
||||||
AbstractTextBox newHostBox = (AbstractTextBox)OptionsUI!.Items[0];
|
AbstractTextBox newHostBox = (AbstractTextBox)OptionsUI![0];
|
||||||
newHostBox.ValueChanged += OnHostChanged;
|
newHostBox.ValueChanged += OnHostChanged;
|
||||||
newHostBox.Value = "zunes.me";
|
newHostBox.Value = "zunes.me";
|
||||||
|
|
||||||
@@ -120,7 +117,7 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
// Get and validate replacement host
|
// Get and validate replacement host
|
||||||
string oldHost = "zune.net";
|
string oldHost = "zune.net";
|
||||||
string newHost = ((AbstractTextBox)OptionsUI!.Items[0]).Value;
|
string newHost = ((AbstractTextBox)OptionsUI![0]).Value;
|
||||||
if (newHost.Length != oldHost.Length)
|
if (newHost.Length != oldHost.Length)
|
||||||
{
|
{
|
||||||
return $"The new host (\"{newHost}\") must have the same length as \"{oldHost}\".";
|
return $"The new host (\"{newHost}\") must have the same length as \"{oldHost}\".";
|
||||||
@@ -225,7 +222,7 @@ namespace ZuneModCore.Mods
|
|||||||
|
|
||||||
async void OnHostChanged(object? sender, string newHost)
|
async void OnHostChanged(object? sender, string newHost)
|
||||||
{
|
{
|
||||||
AbstractDataList list = (AbstractDataList)OptionsUI!.Items[1];
|
AbstractDataList list = (AbstractDataList)OptionsUI![1];
|
||||||
|
|
||||||
// Reset all statuses
|
// Reset all statuses
|
||||||
foreach (AbstractUIMetadata metadata in list.Items)
|
foreach (AbstractUIMetadata metadata in list.Items)
|
||||||
|
|||||||
@@ -10,11 +10,12 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
<PackageReference Include="Microsoft.Win32.Registry" Version="5.0.0" />
|
||||||
<PackageReference Include="OwlCore" Version="0.0.43" />
|
<PackageReference Include="OwlCore" Version="0.4.1" />
|
||||||
|
<PackageReference Include="OwlCore.AbstractUI" Version="0.0.0" />
|
||||||
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
|
||||||
<PackageReference Include="TagLibSharp" Version="2.2.0" />
|
<PackageReference Include="TagLibSharp" Version="2.3.0" />
|
||||||
<PackageReference Include="Vanara.PInvoke.Kernel32" Version="3.4.6" />
|
<PackageReference Include="Vanara.PInvoke.Kernel32" Version="3.4.17" />
|
||||||
<PackageReference Include="Vanara.PInvoke.Security" Version="3.4.6" />
|
<PackageReference Include="Vanara.PInvoke.Security" Version="3.4.17" />
|
||||||
<PackageReference Include="Vestris.ResourceLib" Version="2.1.0" />
|
<PackageReference Include="Vestris.ResourceLib" Version="2.1.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
|||||||
@@ -20,14 +20,14 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Flurl.Http" Version="3.2.0" />
|
<PackageReference Include="Flurl.Http" Version="4.0.2" />
|
||||||
<PackageReference Include="MahApps.Metro" Version="2.4.9" />
|
<PackageReference Include="MahApps.Metro" Version="2.4.10" />
|
||||||
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="4.4.0" />
|
<PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
|
||||||
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.4.0" />
|
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
|
||||||
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.39" />
|
<PackageReference Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.77" />
|
||||||
<PackageReference Include="OwlCore" Version="0.0.43" />
|
<PackageReference Include="OwlCore" Version="0.4.1" />
|
||||||
<PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.4" />
|
<PackageReference Include="Microsoft-WindowsAPICodePack-Shell" Version="1.1.5" />
|
||||||
<PackageReference Include="Syroot.Windows.IO.KnownFolders" Version="1.2.3" />
|
<PackageReference Include="Syroot.Windows.IO.KnownFolders" Version="1.3.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user