mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Data model visualization - Simplified and improved VMs
Layer conditions - Added left side property selection
This commit is contained in:
1 parent
f9d26a8ba3
commit
c0f2cf08de
38 files changed
+908
-359
No files matched your search
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions.Abstract
|
||||
{
|
||||
public abstract class DisplayConditionPart
|
||||
{
|
||||
private readonly List<DisplayConditionPart> _children;
|
||||
|
||||
protected DisplayConditionPart()
|
||||
{
|
||||
_children = new List<DisplayConditionPart>();
|
||||
}
|
||||
|
||||
public DisplayConditionPart Parent { get; set; }
|
||||
public IReadOnlyList<DisplayConditionPart> Children => _children.AsReadOnly();
|
||||
|
||||
public void AddChild(DisplayConditionPart displayConditionPart)
|
||||
{
|
||||
if (!_children.Contains(displayConditionPart))
|
||||
{
|
||||
displayConditionPart.Parent = this;
|
||||
_children.Add(displayConditionPart);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveChild(DisplayConditionPart displayConditionPart)
|
||||
{
|
||||
if (_children.Contains(displayConditionPart))
|
||||
{
|
||||
displayConditionPart.Parent = null;
|
||||
_children.Remove(displayConditionPart);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions.Abstract
|
||||
{
|
||||
public abstract class LayerConditionPart
|
||||
{
|
||||
protected LayerConditionPart()
|
||||
{
|
||||
Children = new List<LayerConditionPart>();
|
||||
}
|
||||
|
||||
public List<LayerConditionPart> Children { get; set; }
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -4,9 +4,9 @@ using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions
|
||||
{
|
||||
public class LayerCondition
|
||||
public class DisplayCondition
|
||||
{
|
||||
public Expression<Func<DataModel, bool>> ExpressionTree { get; set; }
|
||||
public LayerConditionGroup RootGroup { get; set; }
|
||||
public DisplayConditionGroup RootGroup { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions
|
||||
{
|
||||
public class LayerConditionGroup : LayerConditionPart
|
||||
public class DisplayConditionGroup : DisplayConditionPart
|
||||
{
|
||||
public BooleanOperator BooleanOperator { get; set; }
|
||||
}
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions
|
||||
{
|
||||
public class LayerConditionListStatement : LayerConditionPart
|
||||
public class DisplayConditionListPredicate : DisplayConditionPart
|
||||
{
|
||||
public ListOperator ListOperator { get; set; }
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ using Artemis.Core.Services.Interfaces;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions
|
||||
{
|
||||
public abstract class LayerConditionOperator
|
||||
public abstract class DisplayConditionOperator
|
||||
{
|
||||
private IDataModelService _dataModelService;
|
||||
private bool _registered;
|
||||
+2
-2
@@ -3,12 +3,12 @@ using Artemis.Core.Models.Profile.Conditions.Abstract;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions
|
||||
{
|
||||
public class LayerConditionStatement : LayerConditionPart
|
||||
public class DisplayConditionPredicate : DisplayConditionPart
|
||||
{
|
||||
public Guid DataModelGuid { get; set; }
|
||||
public string PropertyPath { get; set; }
|
||||
|
||||
public LayerConditionOperator Operator { get; set; }
|
||||
public DisplayConditionOperator Operator { get; set; }
|
||||
public object Value { get; set; }
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,7 +4,7 @@ using System.Linq.Expressions;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.Conditions.Operators
|
||||
{
|
||||
public class GreaterThanConditionOperator : LayerConditionOperator
|
||||
public class GreaterThanConditionOperator : DisplayConditionOperator
|
||||
{
|
||||
public override IReadOnlyCollection<Type> CompatibleTypes => new List<Type>
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user