Files
PowerToys/src/settings-ui/Settings.UI.Library/AwakeProperties.cs
Den Delimarsky d7617a47d3 [Awake] Context menu bug fixes (#16903)
* Fix the path to the icon

* Need the reverse when not working in isolation

* Updating some tray behaviors

* Making sure we have constants separately, and a filter

* Update tray logic

* Remove unnecessary menus

* Cleaning up how exit is done.

* Adding handling for tray commands

* Update with settings for dynamic times

* Proper reaction to timed keep-awake from the tray

* Proper handling for timed keep-awake from the tray

* Making sure that code analysis works correctly

* Making sure that errors are set in native calls

* Making sure the right icon path is used after testing

* Proper disposal of the context menu

* Fix tray designation

* Update with latest information on changes to the builds

* Update with guidance on files

* Update changelog doc

* Fix project file

* Remove `VTABLE`
2022-03-23 14:46:37 +00:00

44 lines
1.1 KiB
C#

// 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.Collections.Generic;
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class AwakeProperties
{
public AwakeProperties()
{
KeepDisplayOn = false;
Mode = AwakeMode.PASSIVE;
Hours = 0;
Minutes = 0;
TrayTimeShortcuts = new Dictionary<string, int>();
}
[JsonPropertyName("awake_keep_display_on")]
public bool KeepDisplayOn { get; set; }
[JsonPropertyName("awake_mode")]
public AwakeMode Mode { get; set; }
[JsonPropertyName("awake_hours")]
public uint Hours { get; set; }
[JsonPropertyName("awake_minutes")]
public uint Minutes { get; set; }
[JsonPropertyName("tray_times")]
public Dictionary<string, int> TrayTimeShortcuts { get; set; }
}
public enum AwakeMode
{
PASSIVE = 0,
INDEFINITE = 1,
TIMED = 2,
}
}