Profile elements - Simplified class hierarchy

Profile editor - Seperated event types and avoid a lot of type checking
Profile editor - Avoid changing profiles/layers if the new equals the old
Color picker - Fixed binding error
Profile tree - Select first element by default
Profile editor - Adjusted initialization order
This commit is contained in:
Robert committed 2020-07-09 12:23:57 +02:00
1 parent 70aaa645fb
commit 7b27d076b3
25 files changed
+303 -195

No files matched your search

+4 -12
View File
@@ -21,9 +21,8 @@ namespace Artemis.Core.Models.Profile
/// Represents a layer on a profile. To create new layers use the <see cref="LayerService" /> by injecting
/// <see cref="ILayerService" /> into your code
/// </summary>
public sealed class Layer : EffectProfileElement
public sealed class Layer : RenderProfileElement
{
private DisplayConditionGroup _displayConditionGroup;
private LayerGeneralProperties _general;
private SKBitmap _layerBitmap;
private BaseLayerBrush _layerBrush;
@@ -117,14 +116,7 @@ namespace Artemis.Core.Models.Profile
internal set => SetAndNotify(ref _layerBrush, value);
}
/// <summary>
/// Gets or sets the root display condition group
/// </summary>
public DisplayConditionGroup DisplayConditionGroup
{
get => _displayConditionGroup;
set => SetAndNotify(ref _displayConditionGroup, value);
}
public override string ToString()
{
@@ -164,8 +156,8 @@ namespace Artemis.Core.Models.Profile
LayerEntity.Leds.Add(ledEntity);
}
// Conditions TODO
LayerEntity.Conditions.Clear();
// Conditions
DisplayConditionGroup?.ApplyToEntity();
}
#endregion