mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Implemented surface config loading/saving/activating
This commit is contained in:
1 parent
91cd23dadf
commit
7cd8bc246c
8 files changed
+210
-134
No files matched your search
@@ -7,7 +7,7 @@ namespace Artemis.Core.Models.Surface
|
||||
{
|
||||
internal SurfaceConfiguration(string name)
|
||||
{
|
||||
SurfaceEntity = new SurfaceEntity();
|
||||
SurfaceEntity = new SurfaceEntity {SurfacePositions = new List<SurfacePositionEntity>()};
|
||||
Guid = System.Guid.NewGuid().ToString();
|
||||
|
||||
Name = name;
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Artemis.Core.Models.Surface
|
||||
internal SurfacePositionEntity PositionEntity { get; set; }
|
||||
internal string Guid { get; }
|
||||
|
||||
public IRGBDevice Device { get; private set; }
|
||||
public IRGBDevice Device { get; internal set; }
|
||||
public int DeviceId { get; }
|
||||
public string DeviceName { get; }
|
||||
public string DeviceModel { get; }
|
||||
@@ -66,7 +66,10 @@ namespace Artemis.Core.Models.Surface
|
||||
/// </summary>
|
||||
public void ApplyToDevice()
|
||||
{
|
||||
Device.Location = new Point(X, Y);
|
||||
if (Device != null)
|
||||
{
|
||||
Device.Location = new Point(X, Y);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in new issue
Block a user