diff --git a/LinkActions.cs b/LinkActions.cs index 2420b05c7..52ab3d26e 100644 --- a/LinkActions.cs +++ b/LinkActions.cs @@ -1,6 +1,6 @@ using Game = Playnite.SDK.Models.Game; -namespace LinkManager +namespace LinkUtilities { /// /// Interface for classes, that can be used as a link action. Contains texts for the progress bar, result dialog and the action to @@ -19,7 +19,7 @@ public interface ILinkAction /// /// Settings to use for the action /// - LinkManagerSettings Settings { get; set; } + LinkUtilitiesSettings Settings { get; set; } /// /// Executes the action on a game. @@ -36,12 +36,12 @@ public class SortLinks : ILinkAction { public string ProgressMessage { get; set; } public string ResultMessage { get; set; } - public LinkManagerSettings Settings { get; set; } + public LinkUtilitiesSettings Settings { get; set; } - public SortLinks(LinkManagerSettings settings) + public SortLinks(LinkUtilitiesSettings settings) { - ProgressMessage = "LOCLinkManagerLSortLinksProgress"; - ResultMessage = "LOCLinkManagerSortedMessage"; + ProgressMessage = "LOCLinkUtilitiesLSortLinksProgress"; + ResultMessage = "LOCLinkUtilitiesSortedMessage"; Settings = settings; } @@ -63,12 +63,12 @@ public class AddLibraryLinks : ILinkAction public string ProgressMessage { get; set; } public string ResultMessage { get; set; } - public LinkManagerSettings Settings { get; set; } + public LinkUtilitiesSettings Settings { get; set; } - public AddLibraryLinks(LinkManagerSettings settings) + public AddLibraryLinks(LinkUtilitiesSettings settings) { - ProgressMessage = "LOCLinkManagerLibraryLinkProgress"; - ResultMessage = "LOCLinkManagerAddedMessage"; + ProgressMessage = "LOCLinkUtilitiesLibraryLinkProgress"; + ResultMessage = "LOCLinkUtilitiesAddedMessage"; Settings = settings; libraries = new Libraries(Settings); diff --git a/LinkAssociations.cs b/LinkAssociations.cs index 538b66d4a..7bfc7178e 100644 --- a/LinkAssociations.cs +++ b/LinkAssociations.cs @@ -1,11 +1,11 @@ -using LinkManager.Models.Gog; -using LinkManager.Models.Itch; +using LinkUtilities.Models.Gog; +using LinkUtilities.Models.Itch; using System; using System.Collections.Generic; using System.Net; using Game = Playnite.SDK.Models.Game; -namespace LinkManager +namespace LinkUtilities { /// /// Interface for all the websites a link can be added to @@ -27,7 +27,7 @@ interface ILinkAssociation /// /// Settings to be used /// - LinkManagerSettings Settings { get; set; } + LinkUtilitiesSettings Settings { get; set; } /// /// Adds a link to the specific game page of the specified website. @@ -47,7 +47,7 @@ class SteamLink : ILinkAssociation public Guid AssociationId { get; set; } public string LinkName { get; set; } public string LinkUrl { get; set; } - public LinkManagerSettings Settings { get; set; } + public LinkUtilitiesSettings Settings { get; set; } public bool AddLink(Game game) { @@ -55,7 +55,7 @@ public bool AddLink(Game game) return LinkHelper.AddLink(game, LinkName, string.Format(LinkUrl, game.GameId)); } - public SteamLink(LinkManagerSettings settings) + public SteamLink(LinkUtilitiesSettings settings) { AssociationId = Guid.Parse("cb91dfc9-b977-43bf-8e70-55f46e410fab"); LinkName = "Steam"; @@ -72,7 +72,7 @@ class GogLink : ILinkAssociation public Guid AssociationId { get; set; } public string LinkName { get; set; } public string LinkUrl { get; set; } - public LinkManagerSettings Settings { get; set; } + public LinkUtilitiesSettings Settings { get; set; } public bool AddLink(Game game) { @@ -88,7 +88,7 @@ public bool AddLink(Game game) return LinkHelper.AddLink(game, LinkName, gogMetaData.Links.Store.Href); } - public GogLink(LinkManagerSettings settings) + public GogLink(LinkUtilitiesSettings settings) { AssociationId = Guid.Parse("aebe8b7c-6dc3-4a66-af31-e7375c6b5e9e"); LinkName = "GOG"; @@ -105,7 +105,7 @@ class ItchLink : ILinkAssociation public Guid AssociationId { get; set; } public string LinkName { get; set; } public string LinkUrl { get; set; } - public LinkManagerSettings Settings { get; set; } + public LinkUtilitiesSettings Settings { get; set; } public bool AddLink(Game game) { @@ -128,7 +128,7 @@ public bool AddLink(Game game) } } - public ItchLink(LinkManagerSettings settings) + public ItchLink(LinkUtilitiesSettings settings) { AssociationId = Guid.Parse("00000001-ebb2-4eec-abcb-7c89937a42bb"); LinkName = "Itch"; @@ -142,7 +142,7 @@ public ItchLink(LinkManagerSettings settings) /// class Libraries : List { - public Libraries(LinkManagerSettings settings) + public Libraries(LinkUtilitiesSettings settings) { Add(new SteamLink(settings)); Add(new GogLink(settings)); diff --git a/LinkHelper.cs b/LinkHelper.cs index 6f7ac1d12..b5126c4d1 100644 --- a/LinkHelper.cs +++ b/LinkHelper.cs @@ -3,10 +3,10 @@ using System.Collections.ObjectModel; using System.Linq; -namespace LinkManager +namespace LinkUtilities { /// - /// Helper class containing functions used in the link manager + /// Helper class containing functions used in the link utilities extension /// internal class LinkHelper { diff --git a/LinkManagerSettingsView.xaml.cs b/LinkManagerSettingsView.xaml.cs deleted file mode 100644 index 9c7253299..000000000 --- a/LinkManagerSettingsView.xaml.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System.Windows.Controls; - -namespace LinkManager -{ - public partial class LinkManagerSettingsView : UserControl - { - public LinkManagerSettingsView() - { - InitializeComponent(); - } - } -} \ No newline at end of file diff --git a/LinkManager.cs b/LinkUtilities.cs similarity index 90% rename from LinkManager.cs rename to LinkUtilities.cs index 913e63f46..ec44674ff 100644 --- a/LinkManager.cs +++ b/LinkUtilities.cs @@ -6,12 +6,12 @@ using System.Windows.Controls; using Game = Playnite.SDK.Models.Game; -namespace LinkManager +namespace LinkUtilities { /// /// Class of the actual playnite extension /// - public class LinkManager : GenericPlugin + public class LinkUtilities : GenericPlugin { /// /// Class to sort the links of a game @@ -23,9 +23,9 @@ public class LinkManager : GenericPlugin /// public AddLibraryLinks AddLibraryLinks; - public LinkManager(IPlayniteAPI api) : base(api) + public LinkUtilities(IPlayniteAPI api) : base(api) { - Settings = new LinkManagerSettingsViewModel(this); + Settings = new LinkUtilitiesSettingsViewModel(this); Properties = new GenericPluginProperties { HasSettings = true @@ -55,7 +55,7 @@ private void DoForAll(List games, ILinkAction linkAction) using (PlayniteApi.Database.BufferedUpdate()) { GlobalProgressOptions globalProgressOptions = new GlobalProgressOptions( - $"LinkManager - {ResourceProvider.GetString(linkAction.ProgressMessage)}", + $"LinkUtilities - {ResourceProvider.GetString(linkAction.ProgressMessage)}", true ) { @@ -85,7 +85,7 @@ private void DoForAll(List games, ILinkAction linkAction) } catch (Exception ex) { - logger.Info("LinkManager:" + ex.Message); + logger.Info("LinkUtilities:" + ex.Message); } }, globalProgressOptions); @@ -98,14 +98,14 @@ private void DoForAll(List games, ILinkAction linkAction) public override IEnumerable GetGameMenuItems(GetGameMenuItemsArgs args) { - string menuSection = ResourceProvider.GetString("LOCLinkManagerName"); + string menuSection = ResourceProvider.GetString("LOCLinkUtilitiesName"); return new List { // Adds the "sort links" item to the game menu. new GameMenuItem { - Description = ResourceProvider.GetString("LOCLinkManagerSortLinks"), + Description = ResourceProvider.GetString("LOCLinkUtilitiesSortLinks"), MenuSection = menuSection, Action = a => { @@ -116,7 +116,7 @@ public override IEnumerable GetGameMenuItems(GetGameMenuItemsArgs // Adds the "add library links" item to the game menu. new GameMenuItem { - Description = ResourceProvider.GetString("LOCLinkManagerAddLibraryLink"), + Description = ResourceProvider.GetString("LOCLinkUtilitiesAddLibraryLink"), MenuSection = menuSection, Action = a => { @@ -132,7 +132,7 @@ public override IEnumerable GetGameMenuItems(GetGameMenuItemsArgs /// /// The settings view model of the extension /// - public LinkManagerSettingsViewModel Settings { get; set; } + public LinkUtilitiesSettingsViewModel Settings { get; set; } /// /// The global GUID to identify the extension in playnite @@ -156,7 +156,7 @@ public override ISettings GetSettings(bool firstRunSettings) /// Settings view public override UserControl GetSettingsView(bool firstRunSettings) { - return new LinkManagerSettingsView(); + return new LinkUtilitiesSettingsView(); } } } \ No newline at end of file diff --git a/LinkManager.csproj b/LinkUtilities.csproj similarity index 90% rename from LinkManager.csproj rename to LinkUtilities.csproj index aa12b2e99..c1d3f17ba 100644 --- a/LinkManager.csproj +++ b/LinkUtilities.csproj @@ -7,8 +7,8 @@ {4FDF1E89-5BC3-4C72-8FDA-0D580E7A5D5F} Library Properties - LinkManager - LinkManager + LinkUtilities + LinkUtilities v4.6.2 512 true @@ -58,10 +58,10 @@ - - - - LinkManagerSettingsView.xaml + + + + LinkUtilitiesSettingsView.xaml @@ -73,7 +73,7 @@ - + Designer MSBuild:Compile diff --git a/LinkManager.sln b/LinkUtilities.sln similarity index 87% rename from LinkManager.sln rename to LinkUtilities.sln index cdb2c1100..51e035076 100644 --- a/LinkManager.sln +++ b/LinkUtilities.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.3.32901.215 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinkManager", "LinkManager.csproj", "{4FDF1E89-5BC3-4C72-8FDA-0D580E7A5D5F}" +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinkUtilities", "LinkUtilities.csproj", "{4FDF1E89-5BC3-4C72-8FDA-0D580E7A5D5F}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/LinkManagerSettings.cs b/LinkUtilitiesSettings.cs similarity index 79% rename from LinkManagerSettings.cs rename to LinkUtilitiesSettings.cs index 26d8704ff..f442de8bc 100644 --- a/LinkManagerSettings.cs +++ b/LinkUtilitiesSettings.cs @@ -2,12 +2,12 @@ using Playnite.SDK.Data; using System.Collections.Generic; -namespace LinkManager +namespace LinkUtilities { /// /// Contains all settings for the extension /// - public class LinkManagerSettings : ObservableObject + public class LinkUtilitiesSettings : ObservableObject { private string itchApiKey = string.Empty; @@ -17,13 +17,13 @@ public class LinkManagerSettings : ObservableObject public string ItchApiKey { get => itchApiKey; set => SetValue(ref itchApiKey, value); } } - public class LinkManagerSettingsViewModel : ObservableObject, ISettings + public class LinkUtilitiesSettingsViewModel : ObservableObject, ISettings { - private readonly LinkManager plugin; - private LinkManagerSettings EditingClone { get; set; } + private readonly LinkUtilities plugin; + private LinkUtilitiesSettings EditingClone { get; set; } - private LinkManagerSettings settings; - public LinkManagerSettings Settings + private LinkUtilitiesSettings settings; + public LinkUtilitiesSettings Settings { get => settings; set @@ -33,13 +33,13 @@ public LinkManagerSettings Settings } } - public LinkManagerSettingsViewModel(LinkManager plugin) + public LinkUtilitiesSettingsViewModel(LinkUtilities plugin) { // Injecting your plugin instance is required for Save/Load method because Playnite saves data to a location based on what plugin requested the operation. this.plugin = plugin; // Load saved settings. - LinkManagerSettings savedSettings = plugin.LoadPluginSettings(); + LinkUtilitiesSettings savedSettings = plugin.LoadPluginSettings(); // LoadPluginSettings returns null if not saved data is available. if (savedSettings != null) @@ -48,7 +48,7 @@ public LinkManagerSettingsViewModel(LinkManager plugin) } else { - Settings = new LinkManagerSettings(); + Settings = new LinkUtilitiesSettings(); } } diff --git a/LinkManagerSettingsView.xaml b/LinkUtilitiesSettingsView.xaml similarity index 61% rename from LinkManagerSettingsView.xaml rename to LinkUtilitiesSettingsView.xaml index 45ed51c8f..3fea1679d 100644 --- a/LinkManagerSettingsView.xaml +++ b/LinkUtilitiesSettingsView.xaml @@ -1,14 +1,14 @@ - - + \ No newline at end of file diff --git a/LinkUtilitiesSettingsView.xaml.cs b/LinkUtilitiesSettingsView.xaml.cs new file mode 100644 index 000000000..5a72546cd --- /dev/null +++ b/LinkUtilitiesSettingsView.xaml.cs @@ -0,0 +1,12 @@ +using System.Windows.Controls; + +namespace LinkUtilities +{ + public partial class LinkUtilitiesSettingsView : UserControl + { + public LinkUtilitiesSettingsView() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Localization/en_US.xaml b/Localization/en_US.xaml index 1b64c6047..5acc3c4b3 100644 --- a/Localization/en_US.xaml +++ b/Localization/en_US.xaml @@ -1,11 +1,11 @@ - Link Manager - Sort links by name - Links of {0} games sorted! - Sorting links... - Add library link - Added links to {0} games! - Adding library links... - API-Key for Itch.io (needed to fetch the library link) + Link Utilities + Sort links by name + Links of {0} games sorted! + Sorting links... + Add library link + Added links to {0} games! + Adding library links... + API-Key for Itch.io (needed to fetch the library link) \ No newline at end of file diff --git a/Models/GogMetaData.cs b/Models/GogMetaData.cs index b9037292b..90649de67 100644 --- a/Models/GogMetaData.cs +++ b/Models/GogMetaData.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; // Contains all the classes needed to deserialize the JSON fetched from the gog api. -namespace LinkManager.Models.Gog +namespace LinkUtilities.Models.Gog { public class BackgroundImage diff --git a/Models/ItchMetaData.cs b/Models/ItchMetaData.cs index c7d6e3f4d..28c487442 100644 --- a/Models/ItchMetaData.cs +++ b/Models/ItchMetaData.cs @@ -1,7 +1,7 @@ using Newtonsoft.Json; // Contains all the classes needed to deserialize the JSON fetched from the itch.io api. -namespace LinkManager.Models.Itch +namespace LinkUtilities.Models.Itch { public class Embed { diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index d7fd0105a..477f04da6 100644 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -5,11 +5,11 @@ // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. -[assembly: AssemblyTitle("LinkManager")] +[assembly: AssemblyTitle("LinkUtilities")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("LinkManager")] +[assembly: AssemblyProduct("LinkUtilities")] [assembly: AssemblyCopyright("Copyright © 2019")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/extension.yaml b/extension.yaml index 2a1828688..e98dbd07a 100644 --- a/extension.yaml +++ b/extension.yaml @@ -1,7 +1,7 @@ -Id: LinkManager_f692b4bb-238d-4080-ae76-4aaefde6f7a1 -Name: Link Manager +Id: LinkUtilties_f692b4bb-238d-4080-ae76-4aaefde6f7a1 +Name: Link Utilities Author: HerrKnarz Version: 0.1 -Module: LinkManager.dll +Module: LinkUtilities.dll Type: GenericPlugin Icon: icon.png \ No newline at end of file