Class RGBSurface
Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.
Inherited Members
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public sealed class RGBSurface : AbstractBindable, IBindable, INotifyPropertyChanged, IDisposable
Constructors
| Edit this page View SourceRGBSurface()
Initializes a new instance of the RGBSurface class.
Declaration
public RGBSurface()
Properties
| Edit this page View SourceBoundary
Gets a copy of the Rectangle representing this RGBSurface.
Declaration
public Rectangle Boundary { get; }
Property Value
Type | Description |
---|---|
Rectangle |
Devices
Gets a readonly list containing all loaded IRGBDevice. This collection should be locked when enumerated in a multi-threaded application.
Declaration
public IReadOnlyList<IRGBDevice> Devices { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<IRGBDevice> |
Leds
Gets a list of all Led on this RGBSurface.
Declaration
public IEnumerable<Led> Leds { get; }
Property Value
Type | Description |
---|---|
IEnumerable<Led> |
UpdateTriggers
Gets a readonly list containing all registered IUpdateTrigger. This collection should be locked when enumerated in a multi-threaded application.
Declaration
public IReadOnlyList<IUpdateTrigger> UpdateTriggers { get; }
Property Value
Type | Description |
---|---|
IReadOnlyList<IUpdateTrigger> |
Methods
| Edit this page View SourceAttach(ILedGroup)
Attaches the specified ILedGroup.
Declaration
public bool Attach(ILedGroup ledGroup)
Parameters
Type | Name | Description |
---|---|---|
ILedGroup | ledGroup | The ILedGroup to attach. |
Returns
Type | Description |
---|---|
bool |
|
Attach(IRGBDevice)
Attaches the specified IRGBDevice.
Declaration
public void Attach(IRGBDevice device)
Parameters
Type | Name | Description |
---|---|---|
IRGBDevice | device | The IRGBDevice to attach. |
Detach(ILedGroup)
Detaches the specified ILedGroup.
Declaration
public bool Detach(ILedGroup ledGroup)
Parameters
Type | Name | Description |
---|---|---|
ILedGroup | ledGroup | The ILedGroup to detache. |
Returns
Type | Description |
---|---|
bool |
|
Detach(IRGBDevice)
Detaches the specified IRGBDevice.
Declaration
public void Detach(IRGBDevice device)
Parameters
Type | Name | Description |
---|---|---|
IRGBDevice | device | The IRGBDevice to detache. |
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
RegisterUpdateTrigger(IUpdateTrigger)
Registers the provided IUpdateTrigger.
Declaration
public void RegisterUpdateTrigger(IUpdateTrigger updateTrigger)
Parameters
Type | Name | Description |
---|---|---|
IUpdateTrigger | updateTrigger | The IUpdateTrigger to register. |
UnregisterUpdateTrigger(IUpdateTrigger)
Unregisters the provided IUpdateTrigger.
Declaration
public void UnregisterUpdateTrigger(IUpdateTrigger updateTrigger)
Parameters
Type | Name | Description |
---|---|---|
IUpdateTrigger | updateTrigger | The IUpdateTrigger to unregister. |
Update(bool)
Perform a full update for all devices. Updates only dirty Led by default, or all Led, if flushLeds is set to true.
Declaration
public void Update(bool flushLeds = false)
Parameters
Type | Name | Description |
---|---|---|
bool | flushLeds | Specifies whether all Led, (including clean ones) should be updated. |
Events
| Edit this page View SourceException
Occurs when a catched exception is thrown inside the RGBSurface.
Declaration
public event RGBSurface.ExceptionEventHandler? Exception
Event Type
Type | Description |
---|---|
RGBSurface.ExceptionEventHandler |
SurfaceLayoutChanged
Occurs when the layout of this RGBSurface changed.
Declaration
public event RGBSurface.SurfaceLayoutChangedEventHandler? SurfaceLayoutChanged
Event Type
Type | Description |
---|---|
RGBSurface.SurfaceLayoutChangedEventHandler |
Updated
Occurs when the RGBSurface update is done.
Declaration
public event RGBSurface.UpdatedEventHandler? Updated
Event Type
Type | Description |
---|---|
RGBSurface.UpdatedEventHandler |
Updating
Occurs when the RGBSurface starts updating.
Declaration
public event RGBSurface.UpdatingEventHandler? Updating
Event Type
Type | Description |
---|---|
RGBSurface.UpdatingEventHandler |