Add property storage capabilities

This commit is contained in:
Den Delimarsky
2021-03-24 07:42:15 -07:00
parent 2304eff3ca
commit 32984dc126
3 changed files with 424 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
using System.Text.Json.Serialization;
namespace Microsoft.PowerToys.Settings.UI.Library
{
public class EspressoProperties
{
public EspressoProperties()
{
IsEnabled = new BoolProperty();
KeepDisplayOn = new BoolProperty();
Mode = EspressoMode.INDEFINITE;
TimeAllocation = new IntProperty();
}
[JsonPropertyName("espresso_is_enabled")]
public BoolProperty IsEnabled { get; set; }
[JsonPropertyName("espresso_keep_display_on")]
public BoolProperty KeepDisplayOn { get; set; }
[JsonPropertyName("espresso_mode")]
public EspressoMode Mode { get; set; }
[JsonPropertyName("espresso_time_allocation")]
public IntProperty TimeAllocation { get; set; }
}
public enum EspressoMode
{
INDEFINITE = 0,
TIMED = 1,
}
}