WorkspacesProperties.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.Text.Json; 6 using System.Text.Json.Serialization; 7 8 namespace Microsoft.PowerToys.Settings.UI.Library 9 { 10 public class WorkspacesProperties 11 { 12 public enum SortByProperty 13 { 14 LastLaunched, 15 Created, 16 Name, 17 } 18 19 public static readonly HotkeySettings DefaultHotkeyValue = new HotkeySettings(true, true, false, false, 0xC0); 20 21 public WorkspacesProperties() 22 { 23 Hotkey = new KeyboardKeysProperty(DefaultHotkeyValue); 24 } 25 26 [JsonPropertyName("hotkey")] 27 public KeyboardKeysProperty Hotkey { get; set; } 28 29 [JsonPropertyName("sortby")] 30 public SortByProperty SortBy { get; set; } 31 32 public string ToJsonString() 33 { 34 return JsonSerializer.Serialize(this); 35 } 36 } 37 }