Project cleanup

This commit is contained in:
Robert committed 2020-02-13 15:17:58 +01:00
1 parent f5e95e43be
commit 3aa9a632ea
51 files changed
+440 -490

No files matched your search

+21 -21
View File
@@ -74,6 +74,27 @@ namespace Artemis.Core.Models.Profile
return (Folder) Children.Single();
}
public void ApplyToProfile()
{
Name = ProfileEntity.Name;
lock (_children)
{
_children.Clear();
// Populate the profile starting at the root, the rest is populated recursively
var rootFolder = ProfileEntity.Folders.FirstOrDefault(f => f.ParentId == new Guid());
if (rootFolder == null)
AddChild(new Folder(this, null, "Root folder"));
else
AddChild(new Folder(this, null, rootFolder));
}
}
public override string ToString()
{
return $"[Profile] {nameof(Name)}: {Name}, {nameof(IsActivated)}: {IsActivated}, {nameof(PluginInfo)}: {PluginInfo}";
}
internal override void ApplyToEntity()
{
ProfileEntity.Id = EntityId;
@@ -91,22 +112,6 @@ namespace Artemis.Core.Models.Profile
ProfileEntity.Layers.AddRange(GetAllLayers().Select(f => f.LayerEntity));
}
public void ApplyToProfile()
{
Name = ProfileEntity.Name;
lock (_children)
{
_children.Clear();
// Populate the profile starting at the root, the rest is populated recursively
var rootFolder = ProfileEntity.Folders.FirstOrDefault(f => f.ParentId == new Guid());
if (rootFolder == null)
AddChild(new Folder(this, null, "Root folder"));
else
AddChild(new Folder(this, null, rootFolder));
}
}
internal void Activate(ArtemisSurface surface)
{
lock (this)
@@ -137,11 +142,6 @@ namespace Artemis.Core.Models.Profile
layer.PopulateLeds(surface);
}
public override string ToString()
{
return $"[Profile] {nameof(Name)}: {Name}, {nameof(IsActivated)}: {IsActivated}, {nameof(PluginInfo)}: {PluginInfo}";
}
#region Events
/// <summary>