Class DeviceLayout
Represents the serializable layout of a IRGBDevice.
Implements
Inherited Members
Namespace: RGB.NET.Layout
Assembly: RGB.NET.Layout.dll
Syntax
[Serializable]
public class DeviceLayout : IDeviceLayout
Properties
| Edit this page View SourceAuthor
Gets or sets the author of the DeviceLayout.
Declaration
public string? Author { get; set; }
Property Value
Type | Description |
---|---|
string |
CustomData
Gets the the custom data associated with the device.
Declaration
public object? CustomData { get; set; }
Property Value
Type | Description |
---|---|
object |
Description
Gets or sets the description of the DeviceLayout.
Declaration
public string? Description { get; set; }
Property Value
Type | Description |
---|---|
string |
Height
Gets or sets the height of the DeviceLayout.
Declaration
public float Height { get; set; }
Property Value
Type | Description |
---|---|
float |
InternalCustomData
Gets or sets the internal custom data of this layout. Normally you should use CustomData to access or set this data.
Declaration
public object? InternalCustomData { get; set; }
Property Value
Type | Description |
---|---|
object |
InternalLeds
Gets or sets the internal list of led layouts. Normally you should use Leds to access this data.
Declaration
public List<LedLayout> InternalLeds { get; set; }
Property Value
Type | Description |
---|---|
List<LedLayout> |
LedUnitHeight
Gets or sets the height of one 'unit' used for the calculation of led positions and sizes.
Declaration
public float LedUnitHeight { get; set; }
Property Value
Type | Description |
---|---|
float |
LedUnitWidth
Gets or sets the width of one 'unit' used for the calculation of led positions and sizes.
Declaration
public float LedUnitWidth { get; set; }
Property Value
Type | Description |
---|---|
float |
Leds
Gets or sets a list of LedLayout representing all the Led of the DeviceLayout.
Declaration
public IEnumerable<ILedLayout> Leds { get; }
Property Value
Type | Description |
---|---|
IEnumerable<ILedLayout> |
Model
Gets or sets the model of the DeviceLayout.
Declaration
public string? Model { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the name of the DeviceLayout.
Declaration
public string? Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Shape
Gets or sets the Shape of the DeviceLayout.
Declaration
public Shape Shape { get; set; }
Property Value
Type | Description |
---|---|
Shape |
Type
Gets or sets the RGBDeviceType of the DeviceLayout.
Declaration
public RGBDeviceType Type { get; set; }
Property Value
Type | Description |
---|---|
RGBDeviceType |
Vendor
Gets or sets the vendor of the DeviceLayout.
Declaration
public string? Vendor { get; set; }
Property Value
Type | Description |
---|---|
string |
Width
Gets or sets the width of the DeviceLayout.
Declaration
public float Width { get; set; }
Property Value
Type | Description |
---|---|
float |
Methods
| Edit this page View SourceGetCustomData(object?, Type?)
Gets the deserialized custom data.
Declaration
protected virtual object? GetCustomData(object? customData, Type? type)
Parameters
Type | Name | Description |
---|---|---|
object | customData | The internal custom data node. |
Type | type | The type of the custom data. |
Returns
Type | Description |
---|---|
object | The deserialized custom data object. |
Load(Stream, Type?, Type?)
Creates a new DeviceLayout from the specified xml.
Declaration
public static DeviceLayout? Load(Stream stream, Type? customDeviceDataType = null, Type? customLedDataType = null)
Parameters
Type | Name | Description |
---|---|---|
Stream | stream | The stream that contains the layout to be loaded. |
Type | customDeviceDataType | The type of the custom data. |
Type | customLedDataType | The type of the custom data of the leds. |
Returns
Type | Description |
---|---|
DeviceLayout | The deserialized DeviceLayout. |
Load(string, Type?, Type?)
Creates a new DeviceLayout from the specified xml.
Declaration
public static DeviceLayout? Load(string path, Type? customDeviceDataType = null, Type? customLedDataType = null)
Parameters
Type | Name | Description |
---|---|---|
string | path | The path to the xml file. |
Type | customDeviceDataType | The type of the custom data. |
Type | customLedDataType | The type of the custom data of the leds. |
Returns
Type | Description |
---|---|
DeviceLayout | The deserialized DeviceLayout. |