Show / Hide Table of Contents

Class DeviceLayout

Represents the serializable layout of a IRGBDevice.

Inheritance
object
DeviceLayout
Implements
IDeviceLayout
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: RGB.NET.Layout
Assembly: RGB.NET.Layout.dll
Syntax
[Serializable]
public class DeviceLayout : IDeviceLayout

Properties

| Edit this page View Source

Author

Gets or sets the author of the DeviceLayout.

Declaration
public string? Author { get; set; }
Property Value
Type Description
string
| Edit this page View Source

CustomData

Gets the the custom data associated with the device.

Declaration
public object? CustomData { get; set; }
Property Value
Type Description
object
| Edit this page View Source

Description

Gets or sets the description of the DeviceLayout.

Declaration
public string? Description { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Height

Gets or sets the height of the DeviceLayout.

Declaration
public float Height { get; set; }
Property Value
Type Description
float
| Edit this page View Source

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

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

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

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

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

Model

Gets or sets the model of the DeviceLayout.

Declaration
public string? Model { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Name

Gets or sets the name of the DeviceLayout.

Declaration
public string? Name { get; set; }
Property Value
Type Description
string
| Edit this page View Source

Shape

Gets or sets the Shape of the DeviceLayout.

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

Type

Gets or sets the RGBDeviceType of the DeviceLayout.

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

Vendor

Gets or sets the vendor of the DeviceLayout.

Declaration
public string? Vendor { get; set; }
Property Value
Type Description
string
| Edit this page View Source

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 Source

GetCustomData(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.

| Edit this page View Source

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.

| Edit this page View Source

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.

Implements

IDeviceLayout

Extension Methods

LayoutExtension.ApplyTo(IDeviceLayout, IRGBDevice, bool, bool)
LayoutExtension.Save(IDeviceLayout, Stream)
LayoutExtension.Save(IDeviceLayout, string)
  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX