Profiles - Abstracted property elements and effect elements

Folders - Added properties to folders
Layer effects - Expanded to folders
Layer effects - Added shape clipping
This commit is contained in:
SpoinkyNL committed 2020-06-17 19:21:23 +02:00
1 parent 1a637f7f95
commit 9f778d840f
42 files changed
+638 -347

No files matched your search

@@ -52,8 +52,11 @@ namespace Artemis.UI.PropertyInput
protected override void OnInputValueApplied()
{
_layerService.RemoveLayerBrush(LayerProperty.Layer);
_layerService.InstantiateLayerBrush(LayerProperty.Layer);
if (LayerProperty.ProfileElement is Layer layer)
{
_layerService.RemoveLayerBrush(layer);
_layerService.InstantiateLayerBrush(layer);
}
}
private void SetBrushByDescriptor(LayerBrushDescriptor value)
@@ -1,4 +1,6 @@
using Artemis.Core.Models.Profile.LayerProperties;
using System;
using Artemis.Core.Extensions;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Shared.PropertyInput;
using Artemis.UI.Shared.Services.Interfaces;
using FluentValidation;
@@ -42,18 +44,18 @@ namespace Artemis.UI.PropertyInput
public SKPointPropertyInputViewModelValidator()
{
RuleFor(vm => vm.X)
.LessThanOrEqualTo(vm => ((SKPoint) vm.LayerProperty.PropertyDescription.MaxInputValue).X)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKPoint);
.LessThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MaxInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue.IsNumber());
RuleFor(vm => vm.X)
.GreaterThanOrEqualTo(vm => ((SKPoint) vm.LayerProperty.PropertyDescription.MaxInputValue).X)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKPoint);
.GreaterThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MinInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MinInputValue.IsNumber());
RuleFor(vm => vm.Y)
.LessThanOrEqualTo(vm => ((SKPoint) vm.LayerProperty.PropertyDescription.MaxInputValue).Y)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKPoint);
.LessThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MaxInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue.IsNumber());
RuleFor(vm => vm.Y)
.GreaterThanOrEqualTo(vm => ((SKPoint) vm.LayerProperty.PropertyDescription.MaxInputValue).Y)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKPoint);
.GreaterThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MinInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MinInputValue.IsNumber());
}
}
}
@@ -1,4 +1,6 @@
using Artemis.Core.Models.Profile.LayerProperties;
using System;
using Artemis.Core.Extensions;
using Artemis.Core.Models.Profile.LayerProperties;
using Artemis.UI.Shared.PropertyInput;
using Artemis.UI.Shared.Services.Interfaces;
using FluentValidation;
@@ -42,18 +44,18 @@ namespace Artemis.UI.PropertyInput
public SKSizePropertyInputViewModelValidator()
{
RuleFor(vm => vm.Width)
.LessThanOrEqualTo(vm => ((SKSize) vm.LayerProperty.PropertyDescription.MaxInputValue).Width)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKSize);
.LessThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MaxInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue.IsNumber());
RuleFor(vm => vm.Width)
.GreaterThanOrEqualTo(vm => ((SKSize) vm.LayerProperty.PropertyDescription.MaxInputValue).Width)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKSize);
.GreaterThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MinInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MinInputValue.IsNumber());
RuleFor(vm => vm.Height)
.LessThanOrEqualTo(vm => ((SKSize) vm.LayerProperty.PropertyDescription.MaxInputValue).Height)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKSize);
.LessThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MaxInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue.IsNumber());
RuleFor(vm => vm.Height)
.GreaterThanOrEqualTo(vm => ((SKSize) vm.LayerProperty.PropertyDescription.MaxInputValue).Height)
.When(vm => vm.LayerProperty.PropertyDescription.MaxInputValue is SKSize);
.GreaterThanOrEqualTo(vm => Convert.ToSingle(vm.LayerProperty.PropertyDescription.MinInputValue))
.When(vm => vm.LayerProperty.PropertyDescription.MinInputValue.IsNumber());
}
}
}