From f7cd3c734c80857b39f6165cee7da4e2cff2a80a Mon Sep 17 00:00:00 2001 From: croire <1432593898@qq.com> Date: Sat, 12 Mar 2022 01:55:28 +0800 Subject: [PATCH] =?UTF-8?q?SettingsManager=E7=B1=BB=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=8D=95=E8=8E=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DownKyi.Core/Settings/SettingsManager.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DownKyi.Core/Settings/SettingsManager.cs b/DownKyi.Core/Settings/SettingsManager.cs index cbed751..a5da781 100644 --- a/DownKyi.Core/Settings/SettingsManager.cs +++ b/DownKyi.Core/Settings/SettingsManager.cs @@ -82,16 +82,16 @@ namespace DownKyi.Core.Settings /// private bool SetSettings() { - string json = JsonConvert.SerializeObject(appSettings); + try + { + string json = JsonConvert.SerializeObject(appSettings); #if DEBUG #else - // 加密字符串 - json = Encryptor.EncryptString(json, password); + // 加密字符串 + json = Encryptor.EncryptString(json, password); #endif - try - { File.WriteAllText(settingsName, json); return true; }