mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
* 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`
44 lines
1.1 KiB
C#
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,
|
|
}
|
|
}
|