Feature: NFController.CheckCore check Core.bin file

This commit is contained in:
ChsBuffer
2021-08-06 05:05:18 +08:00
parent 97fb20e326
commit 0165d080c6
3 changed files with 11 additions and 1 deletions

View File

@@ -34,6 +34,7 @@ namespace Netch.Controllers
_mode = mode;
_rdrConfig = Global.Settings.Redirector;
CheckDriver();
CheckCore();
Dial(NameList.TYPE_FILTERLOOPBACK, "false");
Dial(NameList.TYPE_FILTERICMP, "true");
@@ -160,6 +161,12 @@ namespace Netch.Controllers
Dial(NameList.TYPE_BYPNAME, "^" + Global.NetchDir.ToRegexString() + @"((?!NTT\.exe).)*$");
}
private void CheckCore()
{
if (!File.Exists(Constants.NFCore))
throw new MessageException(i18N.Translate("\"Core.bin\" is missing. Please check your Antivirus software"));
}
#region DriverUtil
private static void CheckDriver()