LidClosed mode for Slash Lightning

This commit is contained in:
Serge
2024-02-24 12:02:43 +01:00
parent 61cc54b709
commit 34d2273ff5
4 changed files with 37 additions and 1 deletions

View File

@@ -701,6 +701,11 @@ namespace GHelper
matrixControl.SetBatteryAuto();
}
private void CheckMatrixLid_CheckedChanged(object? sender, EventArgs e)
{
AppConfig.Set("matrix_lid", checkMatrixLid.Checked ? 1 : 0);
matrixControl.SetLidMode();
}
private void ButtonMatrix_Click(object? sender, EventArgs e)
@@ -929,7 +934,8 @@ namespace GHelper
for (int i = 1; i <= 5; i++) comboInterval.Items.Add($"Interval {i}s");
buttonMatrix.Visible = false;
}
checkMatrixLid.Visible = true;
}
comboMatrix.SelectedIndex = Math.Min(AppConfig.Get("matrix_brightness", 0), comboMatrix.Items.Count - 1);
comboMatrixRunning.SelectedIndex = Math.Min(AppConfig.Get("matrix_running", 0), comboMatrixRunning.Items.Count - 1);
@@ -938,6 +944,10 @@ namespace GHelper
checkMatrix.Checked = AppConfig.Is("matrix_auto");
checkMatrix.CheckedChanged += CheckMatrix_CheckedChanged;
checkMatrixLid.Checked = AppConfig.Is("matrix_lid");
checkMatrixLid.CheckedChanged += CheckMatrixLid_CheckedChanged;
}