Esempio n. 1
0
 private static void UpdateSettingsFunction()
 {
     HostsFileCatcher.WriteSettings();
     if (IsOn())
     {
         DnsController.setMode(Resources.profile.Default.safe_server);
         HostsFileCatcher.StartCatching();
     }
     else
     {
         HostsFileCatcher.ReleaseCatch();
         DnsController.setMode(false);
     }
 }
Esempio n. 2
0
 public static void UpdateSettings()
 {
     //Thread thr = new Thread(new ThreadStart(UpdateSettingsFunction));
     //thr.Start();
     HostsFileCatcher.WriteSettings();
     if (IsOn())
     {
         DnsController.setMode(Resources.profile.Default.safe_server);
         HostsFileCatcher.StartCatching();
     }
     else
     {
         HostsFileCatcher.ReleaseCatch();
         DnsController.setMode(false);
     }
 }