Singer Instruments PIXL Client
CanSleepChanged Event
Example 



SI.PIXL.Client Namespace > PIXLClient Class : CanSleepChanged Event
Occurs when the PIXLClient.CanSleep property changes.
Syntax
'Declaration
 
Public Event CanSleepChanged As EventHandler(Of Boolean)
'Usage
 
Dim instance As PIXLClient
Dim handler As EventHandler(Of Boolean)
 
AddHandler instance.CanSleepChanged, handler
public event EventHandler<bool> CanSleepChanged
public:
event EventHandler<bool>^ CanSleepChanged
Example
This sample shows how to handle the CanSleepChanged event.
// Subscribe to CanSleepChanged events.
pixl.CanSleepChanged += (sender, canSleep) =>
{
    // Publish an update to the Console.
    Console.WriteLine($"PIXL can now {(canSleep ? "sleep" : "not sleep")}.");
};
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

PIXLClient Class
PIXLClient Members