[Awake]Refactor and update version - DAISY023_04102024 (#32378)

Improves the following:

- Consolidates different code paths for easier maintenance.
- Removes the dependency on Windows Forms and creates the system tray
icon and handling through native Win32 APIs (massive thank you to
@BrianPeek for helping write the window creation logic and diagnosing
threading issues).
- Changing modes in Awake now triggers icon changes in the tray
(#11996). Massive thank you to @niels9001 for creating the icons.

Fixes the following:

- When in the UI and you select `0` as hours and `0` as minutes in
`TIMED` awake mode, the UI becomes non-responsive whenever you try to
get back to timed after it rolls back to `PASSIVE`. (#33630)
- Adds the option to keep track of Awake state through tray tooltip.
(#12714)

---------

Co-authored-by: Clint Rutkas <clint@rutkas.com>
Co-authored-by: Jaime Bernardo <jaime@janeasystems.com>
This commit is contained in:
Den Delimarsky
2024-07-25 09:09:17 -07:00
committed by GitHub
parent 63625a1cee
commit 1be3b6c087
35 changed files with 1054 additions and 640 deletions

View File

@@ -4,6 +4,7 @@
using System;
using System.Linq;
using System.Reflection;
using System.Text.Json.Serialization;
using Microsoft.PowerToys.Settings.UI.Library.Interfaces;
@@ -12,12 +13,11 @@ namespace Microsoft.PowerToys.Settings.UI.Library
public class AwakeSettings : BasePTModuleSettings, ISettingsConfig, ICloneable
{
public const string ModuleName = "Awake";
public const string ModuleVersion = "0.0.2";
public AwakeSettings()
{
Name = ModuleName;
Version = ModuleVersion;
Version = Assembly.GetExecutingAssembly().GetName().Version.ToString();
Properties = new AwakeProperties();
}