KeyboardManagerProperties.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System.Collections.Generic; 6 using System.Text.Json; 7 using System.Text.Json.Serialization; 8 9 using Settings.UI.Library.Attributes; 10 11 namespace Microsoft.PowerToys.Settings.UI.Library 12 { 13 public class KeyboardManagerProperties 14 { 15 [JsonPropertyName("activeConfiguration")] 16 [CmdConfigureIgnoreAttribute] 17 public GenericProperty<string> ActiveConfiguration { get; set; } 18 19 // List of all Keyboard Configurations. 20 [JsonPropertyName("keyboardConfigurations")] 21 [CmdConfigureIgnoreAttribute] 22 public GenericProperty<List<string>> KeyboardConfigurations { get; set; } 23 24 public KeyboardManagerProperties() 25 { 26 KeyboardConfigurations = new GenericProperty<List<string>>(new List<string> { "default", }); 27 ActiveConfiguration = new GenericProperty<string>("default"); 28 } 29 30 public string ToJsonString() 31 { 32 return JsonSerializer.Serialize(this); 33 } 34 } 35 }