Beispiel #1
0
        public void ScheduleShutdown(ShutdownArgs shutdownArgs)
        {
            string args = new ShutdownCommandArgumentsBuilder()
                          .Seconds(shutdownArgs.Seconds)
                          .OverrideExistingShutdown(shutdownArgs.OverrideExistingShutdown)
                          .ShowNotification(shutdownArgs.ShowNotification)
                          .Build();

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