C# Класс Zazzles.Power

Handle all shutdown requests The windows shutdown command is used instead of the win32 api because it notifies the user prior
Показать файл Открыть проект

Открытые методы

Метод Описание
AbortShutdown ( ) : void

Abort a shutdown if it is not to late

CreateTask ( string parameters ) : void

Create a shutdown command

Hibernate ( ) : void

Hibernate the computer

IsActionPending ( ) : bool
LockWorkStation ( ) : void

Lock the workstation

LogOffUser ( ) : void

Entry off the current user

QueueShutdown ( string parameters, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int gracePeriod = -1 ) : void
Restart ( string comment, Func abortCheckFunc, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
Restart ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
Shutdown ( string comment, Func abortCheckFunc, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
Shutdown ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void

Приватные методы

Метод Описание
DelayShutdown ( dynamic data ) : void
ExecutePendingShutdown ( ) : void
HelpShutdown ( dynamic data ) : void

Called when a shutdown is requested via the Bus

ParseBus ( dynamic data ) : void
Power ( ) : System
ShouldAbort ( ) : bool
TimerElapsed ( object sender, System.Timers.ElapsedEventArgs e ) : void

Описание методов

AbortShutdown() публичный статический Метод

Abort a shutdown if it is not to late
public static AbortShutdown ( ) : void
Результат void

CreateTask() публичный статический Метод

Create a shutdown command
public static CreateTask ( string parameters ) : void
parameters string The parameters to use
Результат void

Hibernate() публичный статический Метод

Hibernate the computer
public static Hibernate ( ) : void
Результат void

IsActionPending() публичный статический Метод

public static IsActionPending ( ) : bool
Результат bool

LockWorkStation() публичный статический Метод

Lock the workstation
public static LockWorkStation ( ) : void
Результат void

LogOffUser() публичный статический Метод

Entry off the current user
public static LogOffUser ( ) : void
Результат void

QueueShutdown() публичный статический Метод

public static QueueShutdown ( string parameters, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int gracePeriod = -1 ) : void
parameters string
options ShutdownOptions
message string
gracePeriod int
Результат void

Restart() публичный статический Метод

public static Restart ( string comment, Func abortCheckFunc, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
abortCheckFunc Func
options ShutdownOptions
message string
seconds int
Результат void

Restart() публичный статический Метод

public static Restart ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
options ShutdownOptions
message string
seconds int
Результат void

Shutdown() публичный статический Метод

public static Shutdown ( string comment, Func abortCheckFunc, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
abortCheckFunc Func
options ShutdownOptions
message string
seconds int
Результат void

Shutdown() публичный статический Метод

public static Shutdown ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
options ShutdownOptions
message string
seconds int
Результат void