mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Introduced `ColorTemperatureOperation` class to manage pending color temperature changes. Updated `MainViewModel` to process operations for specific monitors, improving efficiency and separation of concerns. Added `PendingColorTemperatureOperation` property to `PowerDisplayProperties` for tracking operations. Enhanced IPC messaging with `MonitorId` and `ColorTemperature` in `PowerDisplayActionMessage`. Refactored `PowerDisplayViewModel` and `PowerDisplayPage` to directly apply color temperature to specified monitors. Improved logging for better traceability.
39 lines
1.1 KiB
C#
39 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.Text.Json.Serialization;
|
|
|
|
namespace Microsoft.PowerToys.Settings.UI.Library
|
|
{
|
|
/// <summary>
|
|
/// Message for PowerDisplay module actions
|
|
/// </summary>
|
|
public class PowerDisplayActionMessage
|
|
{
|
|
[JsonPropertyName("action")]
|
|
public ActionData Action { get; set; }
|
|
|
|
public class ActionData
|
|
{
|
|
[JsonPropertyName("PowerDisplay")]
|
|
public PowerDisplayAction PowerDisplay { get; set; }
|
|
}
|
|
|
|
public class PowerDisplayAction
|
|
{
|
|
[JsonPropertyName("action_name")]
|
|
public string ActionName { get; set; }
|
|
|
|
[JsonPropertyName("value")]
|
|
public string Value { get; set; }
|
|
|
|
[JsonPropertyName("monitor_id")]
|
|
public string MonitorId { get; set; }
|
|
|
|
[JsonPropertyName("color_temperature")]
|
|
public int ColorTemperature { get; set; }
|
|
}
|
|
}
|
|
}
|