Use the registry to edit System DNS instead of WMI, check network connection before start mode

This commit is contained in:
ChsBuffer
2020-09-19 19:05:12 +08:00
parent 383efc453d
commit f777fae3d8
7 changed files with 112 additions and 116 deletions

View File

@@ -33,6 +33,13 @@ namespace Netch.Controllers
}
NativeMethods.FlushDNSResolverCache();
if (!Utils.Utils.SearchOutboundAdapter())
{
MessageBoxX.Show("No internet connection");
return false;
}
_ = Task.Run(Firewall.AddNetchFwRules);
try