C# Class Zazzles.Power

Handle all shutdown requests The windows shutdown command is used instead of the win32 api because it notifies the user prior
Afficher le fichier Open project: FOGProject/zazzles

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

AbortShutdown() public static méthode

Abort a shutdown if it is not to late
public static AbortShutdown ( ) : void
Résultat void

CreateTask() public static méthode

Create a shutdown command
public static CreateTask ( string parameters ) : void
parameters string The parameters to use
Résultat void

Hibernate() public static méthode

Hibernate the computer
public static Hibernate ( ) : void
Résultat void

IsActionPending() public static méthode

public static IsActionPending ( ) : bool
Résultat bool

LockWorkStation() public static méthode

Lock the workstation
public static LockWorkStation ( ) : void
Résultat void

LogOffUser() public static méthode

Entry off the current user
public static LogOffUser ( ) : void
Résultat void

QueueShutdown() public static méthode

public static QueueShutdown ( string parameters, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int gracePeriod = -1 ) : void
parameters string
options ShutdownOptions
message string
gracePeriod int
Résultat void

Restart() public static méthode

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
Résultat void

Restart() public static méthode

public static Restart ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
options ShutdownOptions
message string
seconds int
Résultat void

Shutdown() public static méthode

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
Résultat void

Shutdown() public static méthode

public static Shutdown ( string comment, ShutdownOptions options = ShutdownOptions.Abort, string message = null, int seconds ) : void
comment string
options ShutdownOptions
message string
seconds int
Résultat void