mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Fix for startup checkbox
This commit is contained in:
27
Settings.cs
27
Settings.cs
@@ -93,11 +93,26 @@ namespace GHelper
|
||||
|
||||
buttonMatrix.Click += ButtonMatrix_Click;
|
||||
|
||||
checkStartup.CheckedChanged += CheckStartup_CheckedChanged;
|
||||
|
||||
SetTimer();
|
||||
|
||||
}
|
||||
|
||||
private void CheckStartup_CheckedChanged(object? sender, EventArgs e)
|
||||
{
|
||||
if (sender is null) return;
|
||||
CheckBox chk = (CheckBox)sender;
|
||||
|
||||
if (chk.Checked)
|
||||
{
|
||||
Startup.Schedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
Startup.UnSchedule();
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckMatrix_CheckedChanged(object? sender, EventArgs e)
|
||||
{
|
||||
@@ -985,18 +1000,6 @@ namespace GHelper
|
||||
{
|
||||
checkStartup.Checked = status;
|
||||
}
|
||||
private void checkStartup_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
CheckBox chk = (CheckBox)sender;
|
||||
if (chk.Checked)
|
||||
{
|
||||
Startup.Schedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
Startup.UnSchedule();
|
||||
}
|
||||
}
|
||||
|
||||
public void SetBatteryChargeLimit(int limit)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user