|
|
@ -82,16 +82,16 @@ namespace DownKyi.Core.Settings
|
|
|
|
/// <returns></returns>
|
|
|
|
/// <returns></returns>
|
|
|
|
private bool SetSettings()
|
|
|
|
private bool SetSettings()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
string json = JsonConvert.SerializeObject(appSettings);
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string json = JsonConvert.SerializeObject(appSettings);
|
|
|
|
|
|
|
|
|
|
|
|
#if DEBUG
|
|
|
|
#if DEBUG
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
// 加密字符串
|
|
|
|
// 加密字符串
|
|
|
|
json = Encryptor.EncryptString(json, password);
|
|
|
|
json = Encryptor.EncryptString(json, password);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
File.WriteAllText(settingsName, json);
|
|
|
|
File.WriteAllText(settingsName, json);
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|