Implemented surface config loading/saving/activating

This commit is contained in:
Robert Beekman committed 2019-10-22 22:52:02 +02:00
1 parent c4e5e412e0
commit c2c849201d
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>