Show / Hide Table of Contents

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.

Inheritance
object
AbstractBindable
RGBSurface
Implements
IBindable
INotifyPropertyChanged
IDisposable
Inherited Members
AbstractBindable.PropertyChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Core
Assembly: RGB.NET.Core.dll
Syntax
public sealed class RGBSurface : AbstractBindable, IBindable, INotifyPropertyChanged, IDisposable

Constructors

| Edit this page View Source

RGBSurface()

Initializes a new instance of the RGBSurface class.

Declaration
public RGBSurface()

Properties

| Edit this page View Source

Boundary

Gets a copy of the Rectangle representing this RGBSurface.

Declaration
public Rectangle Boundary { get; }
Property Value
Type Description
Rectangle
| Edit this page View Source

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>
| Edit this page View Source

Leds

Gets a list of all Led on this RGBSurface.

Declaration
public IEnumerable<Led> Leds { get; }
Property Value
Type Description
IEnumerable<Led>
| Edit this page View Source

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 Source

Attach(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

true if the ILedGroup could be attached; otherwise, false.

| Edit this page View Source

Attach(IRGBDevice)

Attaches the specified IRGBDevice.

Declaration
public void Attach(IRGBDevice device)
Parameters
Type Name Description
IRGBDevice device

The IRGBDevice to attach.

| Edit this page View Source

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

true if the ILedGroup could be detached; false otherwise.

| Edit this page View Source

Detach(IRGBDevice)

Detaches the specified IRGBDevice.

Declaration
public void Detach(IRGBDevice device)
Parameters
Type Name Description
IRGBDevice device

The IRGBDevice to detache.

| Edit this page View Source

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Declaration
public void Dispose()
| Edit this page View Source

RegisterUpdateTrigger(IUpdateTrigger)

Registers the provided IUpdateTrigger.

Declaration
public void RegisterUpdateTrigger(IUpdateTrigger updateTrigger)
Parameters
Type Name Description
IUpdateTrigger updateTrigger

The IUpdateTrigger to register.

| Edit this page View Source

UnregisterUpdateTrigger(IUpdateTrigger)

Unregisters the provided IUpdateTrigger.

Declaration
public void UnregisterUpdateTrigger(IUpdateTrigger updateTrigger)
Parameters
Type Name Description
IUpdateTrigger updateTrigger

The IUpdateTrigger to unregister.

| Edit this page View Source

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 Source

Exception

Occurs when a catched exception is thrown inside the RGBSurface.

Declaration
public event RGBSurface.ExceptionEventHandler? Exception
Event Type
Type Description
RGBSurface.ExceptionEventHandler
| Edit this page View Source

SurfaceLayoutChanged

Occurs when the layout of this RGBSurface changed.

Declaration
public event RGBSurface.SurfaceLayoutChangedEventHandler? SurfaceLayoutChanged
Event Type
Type Description
RGBSurface.SurfaceLayoutChangedEventHandler
| Edit this page View Source

Updated

Occurs when the RGBSurface update is done.

Declaration
public event RGBSurface.UpdatedEventHandler? Updated
Event Type
Type Description
RGBSurface.UpdatedEventHandler
| Edit this page View Source

Updating

Occurs when the RGBSurface starts updating.

Declaration
public event RGBSurface.UpdatingEventHandler? Updating
Event Type
Type Description
RGBSurface.UpdatingEventHandler

Implements

IBindable
INotifyPropertyChanged
IDisposable

Extension Methods

SurfaceExtensions.AlignDevices(RGBSurface)
SurfaceExtensions.Attach(RGBSurface, IEnumerable<IRGBDevice>)
SurfaceExtensions.Detach(RGBSurface, IEnumerable<IRGBDevice>)
SurfaceExtensions.GetDevices(RGBSurface, RGBDeviceType)
SurfaceExtensions.GetDevices<T>(RGBSurface)
SurfaceExtensions.Load(RGBSurface, IRGBDeviceProvider, RGBDeviceType, bool)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX