mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Added defaults to openrgb device definition
This commit is contained in:
parent
553f99af26
commit
01e671ddeb
@ -56,6 +56,14 @@ public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Adds the specified <see cref="OpenRGBServerDefinition" /> to this device-provider.
|
||||
/// </summary>
|
||||
/// <param name="deviceDefinition">The <see cref="OpenRGBServerDefinition"/> to add.</param>
|
||||
// ReSharper disable once UnusedMember.Global
|
||||
public void AddDeviceDefinition(OpenRGBServerDefinition deviceDefinition) => DeviceDefinitions.Add(deviceDefinition);
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void InitializeSDK()
|
||||
{
|
||||
@ -63,7 +71,7 @@ public class OpenRGBDeviceProvider : AbstractRGBDeviceProvider
|
||||
{
|
||||
try
|
||||
{
|
||||
OpenRGBClient? openRgb = new(ip: deviceDefinition.Ip, port: deviceDefinition.Port, name: deviceDefinition.ClientName, autoconnect: true);
|
||||
OpenRGBClient openRgb = new(ip: deviceDefinition.Ip, port: deviceDefinition.Port, name: deviceDefinition.ClientName, autoconnect: true);
|
||||
_clients.Add(openRgb);
|
||||
deviceDefinition.Connected = true;
|
||||
}
|
||||
|
||||
@ -8,17 +8,17 @@ public class OpenRGBServerDefinition
|
||||
/// <summary>
|
||||
/// The name of the client that will appear in the OpenRGB interface.
|
||||
/// </summary>
|
||||
public string? ClientName { get; set; }
|
||||
public string? ClientName { get; set; } = "RGB.NET";
|
||||
|
||||
/// <summary>
|
||||
/// The ip address of the server.
|
||||
/// </summary>
|
||||
public string? Ip { get; set; }
|
||||
public string? Ip { get; set; } = "127.0.0.1";
|
||||
|
||||
/// <summary>
|
||||
/// The port of the server.
|
||||
/// </summary>
|
||||
public int Port { get; set; }
|
||||
public int Port { get; set; } = 6742;
|
||||
|
||||
/// <summary>
|
||||
/// Whether the provider is connected to this server definition or not.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user