private void ToggleEnabled(object sender, EventArgs e) { ledSettings.EnableKeyLockLEDs = !ledSettings.EnableKeyLockLEDs; ledSettings.SaveSettings(); PropagateSettings(); configEnableItem.Checked = ledSettings.EnableKeyLockLEDs; popupWindow.ShowMessage((ledSettings.EnableKeyLockLEDs ? "Enabled" : "Disabled")); }
private void ApplySettings() { ledSettings.EnableKeyLockLEDs = cbEnable.Checked; ledSettings.AutoStartApp = cbAutoStartApp.Checked; ledSettings.EnableCaps = cbEnableCaps.Checked; ledSettings.EnableNum = cbEnableNum.Checked; ledSettings.EnableScroll = cbEnableScroll.Checked; ledSettings.OsdEnabled = cbOsdEnabled.Checked; ledSettings.OsdPosition = (OSDPosition)cbOSDPosition.SelectedItem; ledSettings.OsdPadding = (int)cbOsdPadding.Value; ledSettings.OsdMargin = (int)cbOsdMargin.Value; ledSettings.OsdRoundedCorners = cbOsdRoundedCorners.Checked; ledSettings.OsdOpacity = (int)cbOsdOpacity.Value; ledSettings.OsdDuration = (int)cbOsdDurtation.Value; ledSettings.CapsOffColor = btnCapsOffColour.BackColor; ledSettings.CapsOnColor = btnCapsOnColour.BackColor; ledSettings.NumOffColor = btnNumOffColour.BackColor; ledSettings.NumOnColor = btnNumOnColour.BackColor; ledSettings.ScrollOffColor = btnScrollOffColour.BackColor; ledSettings.ScrollOnColor = btnScrollOnColour.BackColor; ledSettings.OsdTextColor = btnOsdTxtColour.BackColor == Color.Black ? Color.FromArgb(3, 3, 3) : btnOsdTxtColour.BackColor; ledSettings.OsdBackColor = btnOsdBkColour.BackColor == Color.Black ? Color.FromArgb(3, 3, 3) : btnOsdBkColour.BackColor; ledSettings.OsdShowNum = cbOSDShowNum.Checked; ledSettings.OsdShowCaps = cbOSDShowCaps.Checked; ledSettings.OsdShowScroll = cbOSDShowScroll.Checked; ledSettings.TrayShowNum = cbTrayShowNum.Checked; ledSettings.TrayShowCaps = cbTrayShowCaps.Checked; ledSettings.TrayShowScroll = cbTrayShowScroll.Checked; ledSettings.TrayOnColor = btnTrayOnColor.BackColor; ledSettings.TrayOnBackColor = cbTrayOnTransparent.Checked ? Color.Transparent : btnTrayOnBgColor.BackColor; ledSettings.TrayOffColor = btnTrayOffColor.BackColor; ledSettings.TrayOffBackColor = cbTrayOffTransparent.Checked ? Color.Transparent : btnTrayOffBgColor.BackColor; ledSettings.TrayOnBorder = cbTrayOnBorder.Checked; ledSettings.TrayOffBorder = cbTrayOffBorder.Checked; ledSettings.SaveSettings(); SettingsUpdated?.Invoke(this, new EventArgs()); }