From 207a977e4a66014e145a9049305cea88f7f1bd49 Mon Sep 17 00:00:00 2001 From: Student Main Date: Thu, 17 Jan 2019 23:10:57 +0800 Subject: [PATCH] Fix typo --- .../Controller/System/AutoStartup.cs | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/shadowsocks-csharp/Controller/System/AutoStartup.cs b/shadowsocks-csharp/Controller/System/AutoStartup.cs index 923c16f5..8aa1f6d5 100644 --- a/shadowsocks-csharp/Controller/System/AutoStartup.cs +++ b/shadowsocks-csharp/Controller/System/AutoStartup.cs @@ -121,18 +121,20 @@ namespace Shadowsocks.Controller RESTART_NO_REBOOT = 8, } - // regist restart after system reboot/update - public static void RegisterForRestart(bool regist) + // register restart after system reboot/update + public static void RegisterForRestart(bool register) { - // requested regist and not autostart - if (regist && !Check()) + // requested register and not autostartup + if (register && !Check()) { - // param 1 is process command param + // first parameter is process command line parameter + // if ss-windows use it in future, remember pass it + // needn't include the name of the executable in the command line RegisterApplicationRestart(null, (int)ApplicationRestartFlags.RESTART_NO_CRASH | (int)ApplicationRestartFlags.RESTART_NO_HANG); Logging.Debug("Register restart after system reboot"); } - // request unregist, unregist has no side effect - else if (!regist) + // requested unregister, which has no side effect + else if (!register) { UnregisterApplicationRestart(); Logging.Debug("Unregister restart after system reboot");