Пример #1
0
        public void ScheduleShutdown(ShutdownArgs shutdownArgs)
        {
            string args = new ShutdownCommandArgumentsBuilder()
                          .Seconds(shutdownArgs.Seconds)
                          .OverrideExistingShutdown(shutdownArgs.OverrideExistingShutdown)
                          .ShowNotification(shutdownArgs.ShowNotification)
                          .Build();

            CmdLineUtils.InvokeCommandLineCommand(args);
        }
Пример #2
0
 public void CancelShutdown()
 {
     CmdLineUtils.InvokeCommandLineCommand("/C SHUTDOWN /A");
 }
Пример #3
0
 public void Hibernate()
 {
     CmdLineUtils.InvokeCommandLineCommand($"/C SHUTDOWN /H");
 }