Profiles - Added enter, main and exit timelines

Display conditions - Fleshed out most of the UI
This commit is contained in:
SpoinkyNL committed 2020-07-12 22:27:30 +02:00
1 parent f7453331bf
commit e89199f563
26 files changed
+282 -75

No files matched your search

@@ -33,6 +33,23 @@ namespace Artemis.Core.Models.Profile.Conditions
public BooleanOperator BooleanOperator { get; set; }
public DisplayConditionGroupEntity DisplayConditionGroupEntity { get; set; }
public override bool Evaluate()
{
switch (BooleanOperator)
{
case BooleanOperator.And:
return Children.All(c => c.Evaluate());
case BooleanOperator.Or:
return Children.Any(c => c.Evaluate());
case BooleanOperator.AndNot:
return Children.All(c => !c.Evaluate());
case BooleanOperator.OrNot:
return Children.Any(c => !c.Evaluate());
default:
throw new ArgumentOutOfRangeException();
}
}
internal override void ApplyToEntity()
{
DisplayConditionGroupEntity.BooleanOperator = (int) BooleanOperator;
@@ -49,7 +66,7 @@ namespace Artemis.Core.Models.Profile.Conditions
child.Initialize(dataModelService);
}
public override DisplayConditionPartEntity GetEntity()
internal override DisplayConditionPartEntity GetEntity()
{
return DisplayConditionGroupEntity;
}