Example #1
0
        public void UpdateDns(Location location)
        {
            if (location.Local)
            {
                NetworkConfigurator.AutoDns("Wi-Fi");
            }
            else
            {
                NetworkConfigurator.SetDns(location.DnsServer, "Wi-Fi");
            }

            OnDnsChanged(location);
        }
Example #2
0
        public Form1()
        {
            InitializeComponent();

            _dnsLocation = new DnsLocation();
            FormLoaded  += _dnsLocation.OnMajorAction;

            _dnsEditor             = new DnsEditor();
            _notificationService   = new NotificationService();
            _dnsEditor.DnsChanged += _notificationService.OnDnsChanged;
            _dnsEditor.DnsChanged += _dnsLocation.OnMajorAction;
            NetworkConfigurator.GetAdapters();
            _client = new HttpClient();

            GetQuote();
            OnFormLoaded();
        }