Update save settings only when main window is closed

This commit is contained in:
2022-11-27 16:44:11 +08:00
parent 74ddb428ee
commit d169de9a9e
7 changed files with 6 additions and 16 deletions

View File

@@ -98,7 +98,6 @@ namespace GrasscutterTools.Forms
{
// 保存文件路径
Settings.Default.DropJsonPath = TxtDropJsonPath.Text;
Settings.Default.Save();
base.OnFormClosed(e);
}

View File

@@ -91,7 +91,6 @@ namespace GrasscutterTools.Forms
{
// 保存文件路径
Settings.Default.BannersJsonPath = TxtBannersJsonPath.Text;
Settings.Default.Save();
base.OnFormClosed(e);
}

View File

@@ -172,7 +172,7 @@ namespace GrasscutterTools.Forms
else
Settings.Default.MainFormSize = Size;
// 保存默认设置
// 保存设置
Settings.Default.Save();
}
catch (Exception ex)

View File

@@ -80,7 +80,6 @@ namespace GrasscutterTools.Forms
protected override void OnFormClosed(FormClosedEventArgs e)
{
Settings.Default.ShopJsonPath = TxtShopJsonPath.Text;
Settings.Default.Save();
base.OnFormClosed(e);
}

View File

@@ -57,7 +57,6 @@ namespace GrasscutterTools.Forms
if (Settings.Default.ResourcesDirPath != resourcesDirPath)
{
Settings.Default.ResourcesDirPath = resourcesDirPath;
Settings.Default.Save();
}
CmbLanguage.Items.Clear();
@@ -104,7 +103,6 @@ namespace GrasscutterTools.Forms
GenLines();
Settings.Default.TextMapFileName = CmbLanguage.Text;
Settings.Default.Save();
}
catch (Exception ex)
{