Example #1
0
        private void ManageNetworkDnsMenuItem_Click(object sender, EventArgs e)
        {
            using (frmManageDnsProviders frm = new frmManageDnsProviders(_dnsProviders))
            {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    _dnsProviders.Clear();
                    _dnsProviders.AddRange(frm.DnsProviders);
                    _dnsProviders.Sort();

                    SaveConfig();
                }
            }
        }
        private void ManageNetworkDnsMenuItem_Click(object sender, EventArgs e)
        {
            if (!Program.IsAdmin)
            {
                Program.RunAsAdmin("--network-dns-manage");
                return;
            }

            using (frmManageDnsProviders frm = new frmManageDnsProviders(_dnsProviders))
            {
                if (frm.ShowDialog() == DialogResult.OK)
                {
                    _dnsProviders.Clear();
                    _dnsProviders.AddRange(frm.DnsProviders);
                    _dnsProviders.Sort();

                    SaveConfig();
                }
            }
        }