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:
@@ -286,6 +286,7 @@ namespace GHelper
|
||||
tableVisual.Visible = true;
|
||||
|
||||
var visualValue = (SplendidCommand)AppConfig.Get("visual", (int)SplendidCommand.Default);
|
||||
var colorTempValue = AppConfig.Get("color_temp", VisualControl.DefaultColorTemp);
|
||||
|
||||
comboVisual.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboVisual.DataSource = new BindingSource(VisualControl.GetVisualModes(), null);
|
||||
@@ -293,11 +294,20 @@ namespace GHelper
|
||||
comboVisual.ValueMember = "Key";
|
||||
comboVisual.SelectedValue = visualValue;
|
||||
|
||||
VisualControl.SetVisual(mode : visualValue, init : true);
|
||||
comboColorTemp.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
comboColorTemp.DataSource = new BindingSource(VisualControl.GetTemperatures(), null);
|
||||
comboColorTemp.DisplayMember = "Value";
|
||||
comboColorTemp.ValueMember = "Key";
|
||||
comboColorTemp.SelectedValue = colorTempValue;
|
||||
|
||||
VisualControl.SetVisual(visualValue, colorTempValue, true);
|
||||
|
||||
comboVisual.SelectedValueChanged += ComboVisual_SelectedValueChanged;
|
||||
comboVisual.Visible = true;
|
||||
|
||||
comboColorTemp.SelectedValueChanged += ComboVisual_SelectedValueChanged;
|
||||
comboColorTemp.Visible = true;
|
||||
|
||||
if (gamuts.Count <= 1) return;
|
||||
|
||||
comboGamut.DropDownStyle = ComboBoxStyle.DropDownList;
|
||||
@@ -320,7 +330,8 @@ namespace GHelper
|
||||
private void ComboVisual_SelectedValueChanged(object? sender, EventArgs e)
|
||||
{
|
||||
AppConfig.Set("visual", (int)comboVisual.SelectedValue);
|
||||
VisualControl.SetVisual((SplendidCommand)comboVisual.SelectedValue);
|
||||
AppConfig.Set("color_temp", (int)comboColorTemp.SelectedValue);
|
||||
VisualControl.SetVisual((SplendidCommand)comboVisual.SelectedValue, (int)comboColorTemp.SelectedValue);
|
||||
}
|
||||
|
||||
public void VisualiseBrightness()
|
||||
|
||||
Reference in New Issue
Block a user