2020-04-11 06:22:07 +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.
|
|
|
|
|
|
|
|
|
|
using System;
|
2020-04-09 04:53:09 +08:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
2020-04-20 23:22:36 +08:00
|
|
|
|
using System.Text.Json;
|
2020-04-11 06:22:07 +08:00
|
|
|
|
using System.Text.Json.Serialization;
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Lib
|
|
|
|
|
{
|
|
|
|
|
public class KeyboardManagerSettings : BasePTModuleSettings
|
|
|
|
|
{
|
2020-04-11 06:22:07 +08:00
|
|
|
|
[JsonPropertyName("properties")]
|
|
|
|
|
public KeyboardManagerProperties Properties { get; set; }
|
2020-04-09 04:53:09 +08:00
|
|
|
|
|
2020-04-11 06:22:07 +08:00
|
|
|
|
public KeyboardManagerSettings()
|
2020-04-09 04:53:09 +08:00
|
|
|
|
{
|
2020-04-11 06:22:07 +08:00
|
|
|
|
Properties = new KeyboardManagerProperties();
|
|
|
|
|
version = "1";
|
|
|
|
|
name = "_unset_";
|
2020-04-09 04:53:09 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public KeyboardManagerSettings(string ptName)
|
|
|
|
|
{
|
2020-04-11 06:22:07 +08:00
|
|
|
|
Properties = new KeyboardManagerProperties();
|
|
|
|
|
version = "1";
|
|
|
|
|
name = ptName;
|
2020-04-09 04:53:09 +08:00
|
|
|
|
}
|
2020-04-20 23:22:36 +08:00
|
|
|
|
|
|
|
|
|
// converts the current to a json string.
|
|
|
|
|
public override string ToJsonString()
|
|
|
|
|
{
|
|
|
|
|
return JsonSerializer.Serialize(this);
|
|
|
|
|
}
|
2020-04-09 04:53:09 +08:00
|
|
|
|
}
|
|
|
|
|
}
|