[PT Run] Mitigate JSON Deserialization exception (#6295)

* Add error reporting window on deserialisation error

* Add message box to show launcher errors

* Change report window to messagebox

* nit fix in error window

* Localized string for error window

* update messagebox interface

* Correct ShowMessageBox argument order
This commit is contained in:
Divyansh Srivastava
2020-09-08 10:04:17 -07:00
committed by GitHub
parent 5065239266
commit 52a06b5cdc
6 changed files with 79 additions and 10 deletions

View File

@@ -17,7 +17,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
public PowerLauncherSettings()
{
Properties = new PowerLauncherProperties();
Version = "1";
Version = "1.0";
Name = ModuleName;
}

View File

@@ -13,6 +13,11 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
private const string DefaultFileName = "settings.json";
private const string DefaultModuleName = "";
public static void DeleteSettings(string powertoy, string fileName = DefaultFileName)
{
File.Delete(GetSettingsPath(powertoy, fileName));
}
public static bool SettingsFolderExists(string powertoy)
{
return Directory.Exists(Path.Combine(LocalApplicationDataFolder(), $"Microsoft\\PowerToys\\{powertoy}"));