mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 19:57:07 +02:00
Adjusting settings to leverage base class (#5127)
* renaming / deleting file * adding in base class Co-authored-by: Clint Rutkas <crutkas@microsoft.com>
This commit is contained in:
@@ -3,20 +3,22 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
{
|
||||
public class PowerLauncherSettings : BasePTModuleSettings
|
||||
{
|
||||
public const string POWERTOYNAME = "PowerToys Run";
|
||||
public const string ModuleName = "PowerToys Run";
|
||||
|
||||
public PowerLauncherProperties properties { get; set; }
|
||||
[JsonPropertyName("properties")]
|
||||
public PowerLauncherProperties Properties { get; set; }
|
||||
|
||||
public PowerLauncherSettings()
|
||||
{
|
||||
properties = new PowerLauncherProperties();
|
||||
version = "1";
|
||||
name = POWERTOYNAME;
|
||||
Properties = new PowerLauncherProperties();
|
||||
Version = "1";
|
||||
Name = ModuleName;
|
||||
}
|
||||
|
||||
public virtual void Save()
|
||||
@@ -27,7 +29,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
WriteIndented = true,
|
||||
};
|
||||
|
||||
SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), POWERTOYNAME);
|
||||
SettingsUtils.SaveSettings(JsonSerializer.Serialize(this, options), ModuleName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user