Moved checkbox to

This commit is contained in:
Carsten Braun
2023-05-16 10:41:02 +02:00
parent 2a82e41894
commit b796f9f9d4
4 changed files with 17 additions and 34 deletions

View File

@@ -73,6 +73,7 @@ namespace GHelper
checkNoOverdrive.Text = Properties.Strings.DisableOverdrive;
checkTopmost.Text = Properties.Strings.WindowTop;
checkUSBC.Text = Properties.Strings.OptimizedUSBC;
checkApplyWindowsPowerMode.Text = Properties.Strings.ApplyWindowsPowerPlan;
labelBacklight.Text = Properties.Strings.Keyboard;
labelBacklightBar.Text = Properties.Strings.Lightbar;
@@ -176,6 +177,8 @@ namespace GHelper
checkUSBC.Checked = (Program.config.getConfig("optimized_usbc") == 1);
checkUSBC.CheckedChanged += CheckUSBC_CheckedChanged;
checkApplyWindowsPowerMode.Checked = Program.config.getConfig("auto_apply_power_plan") == 1;
int kb_brightness = Program.config.getConfig("keyboard_brightness");
trackBrightness.Value = (kb_brightness >= 0 && kb_brightness <= 3) ? kb_brightness : 3;
@@ -299,5 +302,11 @@ namespace GHelper
Top = Program.settingsForm.Top;
Left = Program.settingsForm.Left - Width - 5;
}
private void checkApplyWindowsPowerMode_CheckedChanged(object sender, EventArgs e)
{
CheckBox chk = (CheckBox)sender;
Program.config.setConfig("auto_apply_power_plan", chk.Checked ? 1 : 0);
}
}
}