AwakeProperties.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; 6 using System.Collections.Generic; 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 AwakeProperties 14 { 15 public AwakeProperties() 16 { 17 KeepDisplayOn = false; 18 Mode = AwakeMode.PASSIVE; 19 IntervalHours = 0; 20 IntervalMinutes = 1; 21 ExpirationDateTime = DateTimeOffset.Now; 22 CustomTrayTimes = []; 23 } 24 25 [JsonPropertyName("keepDisplayOn")] 26 public bool KeepDisplayOn { get; set; } 27 28 [JsonPropertyName("mode")] 29 public AwakeMode Mode { get; set; } 30 31 [JsonPropertyName("intervalHours")] 32 public uint IntervalHours { get; set; } 33 34 [JsonPropertyName("intervalMinutes")] 35 public uint IntervalMinutes { get; set; } 36 37 [JsonPropertyName("expirationDateTime")] 38 public DateTimeOffset ExpirationDateTime { get; set; } 39 40 [JsonPropertyName("customTrayTimes")] 41 [CmdConfigureIgnore] 42 public Dictionary<string, uint> CustomTrayTimes { get; set; } 43 } 44 }