Add Setting Upgrade

This commit is contained in:
2023-07-22 00:11:01 +08:00
parent c82ce1ea35
commit eb60f402a4
4 changed files with 31 additions and 0 deletions

View File

@@ -47,6 +47,19 @@ namespace GrasscutterTools.Forms
Common.KeyGo = new KeyGo(Handle);
Common.KeyGo.HotKeyTriggerEvent += OnHotKeyTrigger;
try
{
if (!Settings.Default.IsUpgraded)
{
Settings.Default.Upgrade();
Settings.Default.IsUpgraded = true;
}
}
catch (Exception ex)
{
Logger.W(TAG, "Upgrade Settings failed.", ex);
}
try
{
var location = Settings.Default.MainFormLocation;