mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Profiles - Added enter, main and exit timelines
Display conditions - Fleshed out most of the UI
This commit is contained in:
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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user