diff --git a/application/GW2 Addon Manager/Backend/Configuration/PluginManagement.cs b/application/GW2 Addon Manager/Backend/Configuration/PluginManagement.cs index ca28003..a34985a 100644 --- a/application/GW2 Addon Manager/Backend/Configuration/PluginManagement.cs +++ b/application/GW2 Addon Manager/Backend/Configuration/PluginManagement.cs @@ -1,10 +1,27 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; using System.Windows; namespace GW2_Addon_Manager { class PluginManagement { + /// + /// Sets version fields of all installed and enabled addons to a dummy value so they are redownloaded, then starts update process. + /// Intended for use if a user borks their install (probably by manually deleting something in the /addons/ folder). + /// + public static bool ForceRedownload() + { + string redownloadmsg = "This will forcibly redownload all installed addons regardless of their version. Do you wish to continue?"; + if (MessageBox.Show(redownloadmsg, "Warning!", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes) + { + UserConfig config = Configuration.getConfigAsYAML(); + config.version = config.version.ToDictionary(entry => entry.Key, entry => "dummy value"); + Configuration.setConfigAsYAML(config); + return true; + } + return false; + } /// /// Deletes all addons and resets config to default state. diff --git a/application/GW2 Addon Manager/Resources/config_template.yaml b/application/GW2 Addon Manager/Resources/config_template.yaml index 121bb06..66e7e94 100644 --- a/application/GW2 Addon Manager/Resources/config_template.yaml +++ b/application/GW2 Addon Manager/Resources/config_template.yaml @@ -1,4 +1,4 @@ -application_version: v1.1.1 +application_version: v1.2.2 loader_version: bin_folder: isupdate: true diff --git a/application/GW2 Addon Manager/UI/OpeningPage/OpeningView.xaml b/application/GW2 Addon Manager/UI/OpeningPage/OpeningView.xaml index 487cd84..3666645 100644 --- a/application/GW2 Addon Manager/UI/OpeningPage/OpeningView.xaml +++ b/application/GW2 Addon Manager/UI/OpeningPage/OpeningView.xaml @@ -39,7 +39,33 @@ - + + + + + + | + + + + +