2020-04-08 15:19:00 +08:00
|
|
|
|
// Copyright (c) Microsoft Corporation
|
|
|
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
|
|
|
// See the LICENSE file in the project root for more information.
|
2020-04-04 10:02:38 +08:00
|
|
|
|
|
2020-04-27 04:15:40 +08:00
|
|
|
|
using System.Text.Json;
|
|
|
|
|
|
2020-04-04 10:02:38 +08:00
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
|
|
|
|
{
|
|
|
|
|
public class PowerLauncherSettings : BasePTModuleSettings
|
|
|
|
|
{
|
2020-04-27 04:15:40 +08:00
|
|
|
|
public const string POWERTOYNAME = "PowerLauncher";
|
|
|
|
|
|
2020-04-04 10:02:38 +08:00
|
|
|
|
public PowerLauncherProperties properties { get; set; }
|
2020-04-08 15:19:00 +08:00
|
|
|
|
|
2020-04-04 10:02:38 +08:00
|
|
|
|
public PowerLauncherSettings()
|
|
|
|
|
{
|
2020-04-11 06:22:07 +08:00
|
|
|
|
properties = new PowerLauncherProperties();
|
|
|
|
|
version = "1";
|
|
|
|
|
name = "_unset_";
|
2020-04-04 10:02:38 +08:00
|
|
|
|
}
|
2020-04-27 04:15:40 +08:00
|
|
|
|
|
|
|
|
|
public virtual void Save()
|
|
|
|
|
{
|
|
|
|
|
// Save settings to file
|
|
|
|
|
var options = new JsonSerializerOptions
|
|
|
|
|
{
|
|
|
|
|
WriteIndented = true,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), POWERTOYNAME);
|
|
|
|
|
}
|
2020-04-04 10:02:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|