mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Color Temp Controls
This commit is contained in:
@@ -39,7 +39,7 @@ namespace GHelper.Display
|
||||
|
||||
private static System.Timers.Timer brightnessTimer = new System.Timers.Timer(100);
|
||||
|
||||
|
||||
public const int DefaultColorTemp = 50;
|
||||
static VisualControl()
|
||||
{
|
||||
brightnessTimer.Elapsed += BrightnessTimerTimer_Elapsed;
|
||||
@@ -98,6 +98,20 @@ namespace GHelper.Display
|
||||
};
|
||||
}
|
||||
|
||||
public static Dictionary<int, string> GetTemperatures()
|
||||
{
|
||||
return new Dictionary<int, string>
|
||||
{
|
||||
{ 0, "Warmest"},
|
||||
{ 15, "Warmer"},
|
||||
{ 30, "Warm"},
|
||||
{ 50, "Neutral"},
|
||||
{ 70, "Cold"},
|
||||
{ 85, "Colder"},
|
||||
{ 100, "Coldest"},
|
||||
};
|
||||
}
|
||||
|
||||
public static void SetGamut(int mode = 50)
|
||||
{
|
||||
if (RunSplendid(SplendidCommand.GamutMode, 0, mode)) return;
|
||||
@@ -110,11 +124,13 @@ namespace GHelper.Display
|
||||
}
|
||||
}
|
||||
|
||||
public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int whiteBalance = 50, bool init = false)
|
||||
public static void SetVisual(SplendidCommand mode = SplendidCommand.Default, int whiteBalance = DefaultColorTemp, bool init = false)
|
||||
{
|
||||
if (mode == SplendidCommand.None) return;
|
||||
if (mode == SplendidCommand.Default && init) return; // Skip default setting on init
|
||||
|
||||
if (whiteBalance != DefaultColorTemp && !init) ProcessHelper.RunAsAdmin();
|
||||
|
||||
int balance = mode == SplendidCommand.Eyecare ? 2 : whiteBalance;
|
||||
if (RunSplendid(mode, 0, balance)) return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user