Имя пользователя:
Пароль:
 

Показать сообщение отдельно

Пользователь


Сообщения: 60
Благодарности: 0

Профиль | Отправить PM | Цитировать


Искал искал, в итоге проще оказалось написать самому)) C#
Код: Выделить весь код
          RegistryKey Key = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
          radioButton1.Checked = Key?.GetValue("ProxyEnable")?.ToString() == "1" ? true : false;
          radioButton2.Checked = Key?.GetValue("ProxyEnable")?.ToString() == "0" ? true : false;

        private void radioButton1_CheckedChanged(object sender, EventArgs e)
        {
            RegistryKey saveKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
            saveKey.SetValue("ProxyEnable", 1, RegistryValueKind.DWord);
            saveKey.Close();
        }

        private void radioButton2_CheckedChanged(object sender, EventArgs e)
        {
            RegistryKey saveKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings");
            saveKey.SetValue("ProxyEnable", 0, RegistryValueKind.DWord);
            saveKey.Close();

Отправлено: 16:27, 02-06-2021 | #3