/// <summary>
        /// Cycle through each pair in dictionary which define all settings, if subkey or regpath is missing ask to create them
        /// Also decide if a registry option is enabled or not, and adjusts the visible controls
        /// </summary>
        private void CheckEnabledOption()
        {
            foreach (KeyValuePair <string, string> vp in Tools.CONFIGSETTINGS)
            {
                RegistryKeyClass rk = null;

                if (vp.Key == Tools.NOSTARTUPDELAY || vp.Key == Tools.NOBINGSEARCH) //These both are actually CURRENTUSER settings
                {
                    rk = RegistryFactory.CreateStartupCheck(vp.Value, vp.Key, ERegistryHkey.CURRENTUSER);
                }
                else
                {
                    rk = RegistryFactory.CreateStartupCheck(vp.Value, vp.Key);
                }

                string   controlName = vp.Key;
                CheckBox actualCtrl  = (CheckBox)FindCheckBoxWithGivenName(controlName);

                if (actualCtrl != null)
                {
                    actualCtrl.Checked = (rk.KeyOff == true) ? false : true;
                }
                else
                {
                    MessageBox.Show($"Control for {vp.Key} not found!");
                }
            }
        }
 private void ckbxAUOptions_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.AUTOUPDATE_HKEY, BoolToEnum(ckbxNoAutoUpdate.Checked), Tools.ALLOWAUTOUPDATE, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxFastBootEnabled_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.FASTBOOT_HKEY, BoolToEnum(ckbxHiberbootEnabled.Checked), Tools.ALLOWFASTBOOT, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxDataCollectionEnabled_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.DATACOLLECTION_HKEY, BoolToEnum(ckbxAllowTelemetry.Checked), Tools.ALLOWTELEMETRY, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxDisableCortana_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.CORTANA_HKEY, BoolToEnum(ckbxAllowCortana.Checked), Tools.ALLOWCORTANA, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxStartupDelayInMSec_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.NOSTARTUPDELAY_HK, BoolToEnum(ckbxStartupDelayInMSec.Checked), Tools.NOSTARTUPDELAY, Microsoft.Win32.RegistryValueKind.DWord, ERegistryHkey.CURRENTUSER);
 }
 private void ckbxDisableSearchBoxSuggestions_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.WINDOWS_DEF_EXP_HKEY, BoolToEnum(ckbxDisableSearchBoxSuggestions.Checked), Tools.NOBINGSEARCH, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxPersonalization_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.NOLOCKSCREEN_HK, BoolToEnum(ckbxNoLockScreen.Checked), Tools.NOLOCKSCREEN, Microsoft.Win32.RegistryValueKind.DWord);
 }
 private void ckbxEnableMmx_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.WINDOWS_DEF_REG_HKEY, BoolToEnum(ckbxEnableMmx.Checked), Tools.DISABLEYOURPHONE, Microsoft.Win32.RegistryValueKind.DWord);
 }
Пример #10
0
 private void ckbxDisableAntiSpyware_CheckedChanged(object sender, EventArgs e)
 {
     RegistryFactory.Create(Tools.DEFENDER_HKEY, BoolToEnum(ckbxDisableAntiSpyware.Checked), Tools.DISABLEANTISPY, Microsoft.Win32.RegistryValueKind.DWord);
 }