mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-11 19:36:28 +00:00
Implemented profile creation, deletion and activation
This commit is contained in:
1 parent
66f7dc94c8
commit
97907c97eb
17 files changed
+217
-49
No files matched your search
@@ -8,7 +8,7 @@ using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile
|
||||
{
|
||||
public class Folder : ProfileElement
|
||||
public sealed class Folder : ProfileElement
|
||||
{
|
||||
public Folder(Profile profile, Folder folder, string name)
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile
|
||||
{
|
||||
public class Layer : ProfileElement
|
||||
public sealed class Layer : ProfileElement
|
||||
{
|
||||
internal Layer(Profile profile, Folder folder, string name)
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile
|
||||
{
|
||||
public class Profile : ProfileElement
|
||||
public sealed class Profile : ProfileElement
|
||||
{
|
||||
internal Profile(PluginInfo pluginInfo, string name)
|
||||
{
|
||||
@@ -21,6 +21,8 @@ namespace Artemis.Core.Models.Profile
|
||||
Name = name;
|
||||
|
||||
Children = new List<ProfileElement> {new Folder(this, null, "Root folder")};
|
||||
|
||||
ApplyToEntity();
|
||||
}
|
||||
|
||||
internal Profile(PluginInfo pluginInfo, ProfileEntity profileEntity, IPluginService pluginService)
|
||||
|
||||
@@ -71,8 +71,7 @@ namespace Artemis.Core.Models.Surface
|
||||
|
||||
internal void ApplyToEntity()
|
||||
{
|
||||
// Other properties are mapped computed
|
||||
|
||||
// Other properties are computed
|
||||
DeviceEntity.DeviceHashCode = RgbDevice.GetDeviceHashCode();
|
||||
}
|
||||
|
||||
@@ -102,13 +101,6 @@ namespace Artemis.Core.Models.Surface
|
||||
RenderPath = path;
|
||||
}
|
||||
|
||||
internal void Destroy()
|
||||
{
|
||||
DeviceEntity = null;
|
||||
RgbDevice = null;
|
||||
Surface = null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return $"[{RgbDevice.DeviceInfo.DeviceType}] {RgbDevice.DeviceInfo.DeviceName} - {X}.{Y}.{ZIndex}";
|
||||
|
||||
@@ -61,15 +61,6 @@ namespace Artemis.Core.Models.Surface
|
||||
}
|
||||
}
|
||||
|
||||
internal void Destroy()
|
||||
{
|
||||
SurfaceEntity = null;
|
||||
|
||||
foreach (var deviceConfiguration in Devices)
|
||||
deviceConfiguration.Destroy();
|
||||
Devices.Clear();
|
||||
}
|
||||
|
||||
public void UpdateScale(double value)
|
||||
{
|
||||
Scale = value;
|
||||
|
||||
Reference in new issue
Block a user