Exemple #1
0
        public static void ShutdownWithMinutes_DelayMode(int countdownMinute)
        {
            if (countdownMinute >= 60) // bug needs fix.
            {
                SqlExecuter.记录延迟关机事件("1:" + (countdownMinute - 60) + ":0");
            }
            else
            {
                SqlExecuter.记录延迟关机事件("0:" + countdownMinute + ":0");
            }

            ShutdownUtil.CancelShutdownCommand();
            ShutdownUtil.RunShutdownCommand(ShutdownUtil.Mode.关机, countdownMinute * 60);
        }
Exemple #2
0
 public static void ShutdownWithSeconds_DelayMode(int delaySeconds)
 {
     SqlExecuter.记录延迟关机事件(delaySeconds);
     ShutdownUtil.CancelShutdownCommand();
     ShutdownUtil.RunShutdownCommand(ShutdownUtil.Mode.关机, delaySeconds);
 }