/ src / settings-ui / Settings.UI.Library / LightSwitchProperties.cs
LightSwitchProperties.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.Serialization;
 6  
 7  namespace Microsoft.PowerToys.Settings.UI.Library
 8  {
 9      public class LightSwitchProperties
10      {
11          public const bool DefaultChangeSystem = true;
12          public const bool DefaultChangeApps = true;
13          public const int DefaultLightTime = 480;
14          public const int DefaultDarkTime = 1200;
15          public const int DefaultSunriseOffset = 0;
16          public const int DefaultSunsetOffset = 0;
17          public const string DefaultLatitude = "0.0";
18          public const string DefaultLongitude = "0.0";
19          public const string DefaultScheduleMode = "Off";
20          public const bool DefaultEnableDarkModeProfile = false;
21          public const bool DefaultEnableLightModeProfile = false;
22          public const string DefaultDarkModeProfile = "";
23          public const string DefaultLightModeProfile = "";
24          public static readonly HotkeySettings DefaultToggleThemeHotkey = new HotkeySettings(true, true, false, true, 0x44); // Ctrl+Win+Shift+D
25  
26          public LightSwitchProperties()
27          {
28              ChangeSystem = new BoolProperty(DefaultChangeSystem);
29              ChangeApps = new BoolProperty(DefaultChangeApps);
30              LightTime = new IntProperty(DefaultLightTime);
31              DarkTime = new IntProperty(DefaultDarkTime);
32              Latitude = new StringProperty(DefaultLatitude);
33              Longitude = new StringProperty(DefaultLongitude);
34              SunriseOffset = new IntProperty(DefaultSunriseOffset);
35              SunsetOffset = new IntProperty(DefaultSunsetOffset);
36              ScheduleMode = new StringProperty(DefaultScheduleMode);
37              ToggleThemeHotkey = new KeyboardKeysProperty(DefaultToggleThemeHotkey);
38              EnableDarkModeProfile = new BoolProperty(DefaultEnableDarkModeProfile);
39              EnableLightModeProfile = new BoolProperty(DefaultEnableLightModeProfile);
40              DarkModeProfile = new StringProperty(DefaultDarkModeProfile);
41              LightModeProfile = new StringProperty(DefaultLightModeProfile);
42          }
43  
44          [JsonPropertyName("changeSystem")]
45          public BoolProperty ChangeSystem { get; set; }
46  
47          [JsonPropertyName("changeApps")]
48          public BoolProperty ChangeApps { get; set; }
49  
50          [JsonPropertyName("lightTime")]
51          public IntProperty LightTime { get; set; }
52  
53          [JsonPropertyName("darkTime")]
54          public IntProperty DarkTime { get; set; }
55  
56          [JsonPropertyName("sunrise_offset")]
57          public IntProperty SunriseOffset { get; set; }
58  
59          [JsonPropertyName("sunset_offset")]
60          public IntProperty SunsetOffset { get; set; }
61  
62          [JsonPropertyName("latitude")]
63          public StringProperty Latitude { get; set; }
64  
65          [JsonPropertyName("longitude")]
66          public StringProperty Longitude { get; set; }
67  
68          [JsonPropertyName("scheduleMode")]
69          public StringProperty ScheduleMode { get; set; }
70  
71          [JsonPropertyName("toggle-theme-hotkey")]
72          public KeyboardKeysProperty ToggleThemeHotkey { get; set; }
73  
74          [JsonPropertyName("enableDarkModeProfile")]
75          public BoolProperty EnableDarkModeProfile { get; set; }
76  
77          [JsonPropertyName("enableLightModeProfile")]
78          public BoolProperty EnableLightModeProfile { get; set; }
79  
80          [JsonPropertyName("darkModeProfile")]
81          public StringProperty DarkModeProfile { get; set; }
82  
83          [JsonPropertyName("lightModeProfile")]
84          public StringProperty LightModeProfile { get; set; }
85      }
86  }