Class computer
Computer shutdown etc.
public static class computer
Namespace: Au
Assembly: Au.dll
Properties
| Name | Description |
|---|---|
| isOnBattery | Returns |
| tickCountWithoutSleep | Gets the number of milliseconds elapsed since Windows startup, not including the time when the computer sleeps or hibernates. To get time with sleep, use System.Environment.TickCount64. |
Methods
| Name | Description |
|---|---|
| lockOrSwitchUser() | Initiates computer lock operation. |
| logoff(bool) | Initiates computer logoff (sign out) operation. |
| shutdown(bool, bool, int, string, string) | Initiates computer shutdown or restart operation. |
| shutdown(int, uint) | Initiates computer shutdown or restart operation. |
| suspend(CSuspend) | Computer sleep, hibernate or monitor off. |
Events
| Name | Description |
|---|---|
| suspendResumeEvent | When the computer is about to enter a suspended state (sleep or hibernate) or has resumed operation after being suspended. |