diff --git a/src/Artemis.Core/Artemis.Core.csproj.DotSettings b/src/Artemis.Core/Artemis.Core.csproj.DotSettings index 0a4b33a3e..24a752160 100644 --- a/src/Artemis.Core/Artemis.Core.csproj.DotSettings +++ b/src/Artemis.Core/Artemis.Core.csproj.DotSettings @@ -6,6 +6,11 @@ True True True + True + True + True + True + True True True True diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorBrightenModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorBrightenModifierType.cs new file mode 100644 index 000000000..ccc8bf85d --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorBrightenModifierType.cs @@ -0,0 +1,24 @@ +using System; +using System.Collections.Generic; +using SkiaSharp; + +namespace Artemis.Core.DefaultTypes +{ + internal class SKColorBrightenModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => new List {typeof(SKColor)}; + public override Type ParameterType => typeof(float); + + public override string Name => "Brighten by"; + public override string Icon => "CarLightHigh"; + public override string Description => "Brightens the color by the amount in percent"; + + public override object Apply(object currentValue, object parameterValue) + { + ((SKColor) currentValue).ToHsl(out var h, out var s, out var l); + l *= (Convert.ToSingle(parameterValue) + 100f) / 100f; + + return SKColor.FromHsl(h, s, l); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorDarkenModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorDarkenModifierType.cs new file mode 100644 index 000000000..f7e6d470d --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorDarkenModifierType.cs @@ -0,0 +1,23 @@ +using System; +using System.Collections.Generic; +using SkiaSharp; + +namespace Artemis.Core.DefaultTypes +{ + internal class SKColorDarkenModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => new List {typeof(SKColor)}; + public override Type ParameterType => typeof(float); + + public override string Name => "Darken by"; + public override string Icon => "CarLightDimmed"; + public override string Description => "Darkens the color by the amount in percent"; + + public override object Apply(object currentValue, object parameterValue) + { + ((SKColor) currentValue).ToHsl(out var h, out var s, out var l); + l *= (Convert.ToSingle(parameterValue) * -1 + 100f) / 100f; + return SKColor.FromHsl(h, s, l); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/SKColorSumModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorSumModifierType.cs similarity index 79% rename from src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/SKColorSumModifierType.cs rename to src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorSumModifierType.cs index df2acbfb2..f75b2e19e 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/SKColorSumModifierType.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Colors/SKColorSumModifierType.cs @@ -7,8 +7,10 @@ namespace Artemis.Core.DefaultTypes internal class SKColorSumModifierType : DataBindingModifierType { public override IReadOnlyCollection CompatibleTypes => new List {typeof(SKColor)}; - public override string Description => "Combine with"; + + public override string Name => "Combine with"; public override string Icon => "FormatColorFill"; + public override string Description => "Adds the two colors together"; public override object Apply(object currentValue, object parameterValue) { diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/AbsoluteModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/AbsoluteModifierType.cs new file mode 100644 index 000000000..948dfe3ac --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/AbsoluteModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class AbsoluteModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Absolute"; + public override string Icon => "NumericPositive1"; + public override string Category => "Advanced"; + public override string Description => "Converts the input value to an absolute value"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Abs(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/DivideModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/DivideModifierType.cs similarity index 78% rename from src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/DivideModifierType.cs rename to src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/DivideModifierType.cs index b3c6a7482..480dff707 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/DivideModifierType.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/DivideModifierType.cs @@ -5,14 +5,10 @@ namespace Artemis.Core.DefaultTypes { internal class DivideModifierType : DataBindingModifierType { - public DivideModifierType() - { - PreferredParameterType = typeof(float); - } - public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override Type ParameterType => typeof(float); - public override string Description => "Divide by"; + public override string Name => "Divide by"; public override string Icon => "Divide"; public override object Apply(object currentValue, object parameterValue) diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MaxModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MaxModifierType.cs new file mode 100644 index 000000000..81c7d35a3 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MaxModifierType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class MaxModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Max"; + public override string Icon => "ChevronUpBoxOutline"; + public override string Category => "Advanced"; + public override string Description => "Keeps only the largest of input value and parameter"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Max(Convert.ToSingle(currentValue), Convert.ToSingle(parameterValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MinModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MinModifierType.cs new file mode 100644 index 000000000..9c8b8b1dc --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MinModifierType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class MinModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Min"; + public override string Icon => "ChevronDownBoxOutline"; + public override string Category => "Advanced"; + public override string Description => "Keeps only the smallest of input value and parameter"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Min(Convert.ToSingle(currentValue), Convert.ToSingle(parameterValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/ModuloModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/ModuloModifierType.cs new file mode 100644 index 000000000..1d8d88af6 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/ModuloModifierType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class ModuloModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Modulo"; + public override string Icon => "Stairs"; + public override string Category => "Advanced"; + public override string Description => "Calculates the remained of the division between the input value and the parameter"; + + public override object Apply(object currentValue, object parameterValue) + { + return Convert.ToSingle(currentValue) % Convert.ToSingle(parameterValue); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/MultiplicationModifier.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MultiplicationModifier.cs similarity index 73% rename from src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/MultiplicationModifier.cs rename to src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MultiplicationModifier.cs index e1c8bb4f7..bf9a804b8 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/MultiplicationModifier.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/MultiplicationModifier.cs @@ -5,14 +5,10 @@ namespace Artemis.Core.DefaultTypes { internal class MultiplicationModifierType : DataBindingModifierType { - public MultiplicationModifierType() - { - PreferredParameterType = typeof(float); - } - public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override Type ParameterType => typeof(float); - public override string Description => "Multiply by"; + public override string Name => "Multiply by"; public override string Icon => "Close"; public override object Apply(object currentValue, object parameterValue) diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/PercentageOfModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PercentageOfModifierType.cs similarity index 73% rename from src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/PercentageOfModifierType.cs rename to src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PercentageOfModifierType.cs index 24509a689..6f7ec4bcd 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/PercentageOfModifierType.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PercentageOfModifierType.cs @@ -5,15 +5,12 @@ namespace Artemis.Core.DefaultTypes { internal class PercentageOfModifierType : DataBindingModifierType { - public PercentageOfModifierType() - { - PreferredParameterType = typeof(float); - } - public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override Type ParameterType => typeof(float); - public override string Description => "Percentage of"; + public override string Name => "Percentage of"; public override string Icon => "Percent"; + public override string Description => "Calculates how much percent the parameter value is of the current value"; public override object Apply(object currentValue, object parameterValue) { diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PowerModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PowerModifierType.cs new file mode 100644 index 000000000..d9499f9e2 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/PowerModifierType.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class PowerModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Power"; + public override string Icon => "Exponent"; + public override string Category => "Advanced"; + public override string Description => "Raises the input value to the power of the parameter value"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Pow(Convert.ToSingle(currentValue), Convert.ToSingle(parameterValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/CeilingModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/CeilingModifierType.cs new file mode 100644 index 000000000..26d984aa2 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/CeilingModifierType.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class CeilingModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Round up"; + public override string Icon => "ArrowUp"; + public override string Category => "Rounding"; + public override string Description => "Ceils the input, rounding it up to the nearest whole number"; + + public override object Apply(object currentValue, object parameterValue) + { + var floatValue = Convert.ToSingle(currentValue); + return Math.Ceiling(floatValue); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/FloorModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/FloorModifierType.cs similarity index 58% rename from src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/FloorModifierType.cs rename to src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/FloorModifierType.cs index 9f33f79b4..a8a1d4cba 100644 --- a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/FloorModifierType.cs +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/FloorModifierType.cs @@ -5,15 +5,13 @@ namespace Artemis.Core.DefaultTypes { internal class FloorModifierType : DataBindingModifierType { - public FloorModifierType() - { - SupportsParameter = false; - } - public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; - public override string Description => "Floor"; - public override string Icon => "ArrowDownDropCircleOutline"; + public override bool SupportsParameter => false; + public override string Name => "Round down"; + public override string Icon => "ArrowDown"; + public override string Category => "Rounding"; + public override string Description => "Floors the input, rounding it down to the nearest whole number"; public override object Apply(object currentValue, object parameterValue) { diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/RoundModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/RoundModifierType.cs new file mode 100644 index 000000000..5475e2476 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Rounding/RoundModifierType.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class RoundModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Round"; + public override string Icon => "ArrowCollapse"; + public override string Category => "Rounding"; + public override string Description => "Rounds the input to the nearest whole number"; + + public override object Apply(object currentValue, object parameterValue) + { + var floatValue = Convert.ToSingle(currentValue); + return Math.Round(floatValue, MidpointRounding.AwayFromZero); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SquareRootModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SquareRootModifierType.cs new file mode 100644 index 000000000..eb4b1384c --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SquareRootModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class SquareRootModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Square root"; + public override string Icon => "SquareRoot"; + public override string Category => "Advanced"; + public override string Description => "Calculates square root of the input value"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Sqrt(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SubtractModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SubtractModifierType.cs new file mode 100644 index 000000000..4bc68a3a4 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SubtractModifierType.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class SubtractModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Subtract"; + public override string Icon => "Minus"; + + public override object Apply(object currentValue, object parameterValue) + { + return Convert.ToSingle(currentValue) - Convert.ToSingle(parameterValue); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SumModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SumModifierType.cs new file mode 100644 index 000000000..2b933780f --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/SumModifierType.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class SumModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + + public override string Name => "Sum"; + public override string Icon => "Plus"; + + public override object Apply(object currentValue, object parameterValue) + { + return Convert.ToSingle(currentValue) + Convert.ToSingle(parameterValue); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosecantModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosecantModifierType.cs new file mode 100644 index 000000000..df76c1efc --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosecantModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class CosecantModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Cosecant"; + public override string Icon => null; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the cosecant"; + + public override object Apply(object currentValue, object parameterValue) + { + return 1f / Math.Sin(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosineModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosineModifierType.cs new file mode 100644 index 000000000..4ceb0988c --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CosineModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class CosineModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Cosine"; + public override string Icon => "MathCos"; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the cosine"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Cos(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CotangentModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CotangentModifierType.cs new file mode 100644 index 000000000..1648aa16a --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/CotangentModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class CotangentModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Cotangent"; + public override string Icon => null; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the cotangent"; + + public override object Apply(object currentValue, object parameterValue) + { + return 1f / Math.Tan(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SecantModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SecantModifierType.cs new file mode 100644 index 000000000..d44a107b0 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SecantModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class SecantModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Secant"; + public override string Icon => null; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the secant"; + + public override object Apply(object currentValue, object parameterValue) + { + return 1f / Math.Cos(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SineModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SineModifierType.cs new file mode 100644 index 000000000..9915cdf87 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/SineModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class SineModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Sine"; + public override string Icon => "MathSin"; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the sine"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Sin(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/TangentModifierType.cs b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/TangentModifierType.cs new file mode 100644 index 000000000..f366f3096 --- /dev/null +++ b/src/Artemis.Core/DefaultTypes/DataBindings/Modifiers/Numbers/Trigonometry/TangentModifierType.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; + +namespace Artemis.Core.DefaultTypes +{ + internal class TangentModifierType : DataBindingModifierType + { + public override IReadOnlyCollection CompatibleTypes => Constants.NumberTypes; + public override bool SupportsParameter => false; + + public override string Name => "Tangent"; + public override string Icon => "MathTan"; + public override string Category => "Trigonometry"; + public override string Description => "Treats the input as an angle and calculates the tangent"; + + public override object Apply(object currentValue, object parameterValue) + { + return Math.Tan(Convert.ToSingle(currentValue)); + } + } +} \ No newline at end of file diff --git a/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifier.cs b/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifier.cs index 5b9c1f1f5..904e44cce 100644 --- a/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifier.cs +++ b/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifier.cs @@ -1,5 +1,4 @@ using System; -using System.Linq; using System.Linq.Expressions; using Artemis.Core.DataModelExpansions; using Artemis.Storage.Entities.Profile.DataBindings; @@ -227,16 +226,16 @@ namespace Artemis.Core ParameterDataModel = null; ParameterPropertyPath = null; - var targetType = DirectDataBinding.DataBinding.GetTargetType(); + var parameterType = ModifierType?.ParameterType ?? DirectDataBinding.DataBinding.GetTargetType(); // If not null ensure the types match and if not, convert it - if (staticValue != null && staticValue.GetType() == targetType) + if (staticValue != null && staticValue.GetType() == parameterType) ParameterStaticValue = staticValue; else if (staticValue != null) - ParameterStaticValue = Convert.ChangeType(staticValue, targetType); + ParameterStaticValue = Convert.ChangeType(staticValue, parameterType); // If null create a default instance for value types or simply make it null for reference types - else if (targetType.IsValueType) - ParameterStaticValue = Activator.CreateInstance(targetType); + else if (parameterType.IsValueType) + ParameterStaticValue = Activator.CreateInstance(parameterType); else ParameterStaticValue = null; @@ -269,18 +268,18 @@ namespace Artemis.Core else if (ParameterType == ProfileRightSideType.Static && Entity.ParameterStaticValue != null && ParameterStaticValue == null) { // Use the target type so JSON.NET has a better idea what to do - var targetType = DirectDataBinding.DataBinding.GetTargetType(); + var parameterType = ModifierType?.ParameterType ?? DirectDataBinding.DataBinding.GetTargetType(); object staticValue; try { - staticValue = JsonConvert.DeserializeObject(Entity.ParameterStaticValue, targetType); + staticValue = JsonConvert.DeserializeObject(Entity.ParameterStaticValue, parameterType); } // If deserialization fails, use the type's default catch (JsonSerializationException e) { DeserializationLogger.LogModifierDeserializationFailure(GetType().Name, e); - staticValue = Activator.CreateInstance(targetType); + staticValue = Activator.CreateInstance(parameterType); } UpdateParameter(staticValue); @@ -307,7 +306,7 @@ namespace Artemis.Core CompiledParameterAccessor = lambda.Compile(); } } - + #region Event handlers private void DataBindingModifierTypeStoreOnDataBindingModifierAdded(object sender, DataBindingModifierTypeStoreEvent e) diff --git a/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifierType.cs b/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifierType.cs index bf0210834..7a5a60ef2 100644 --- a/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifierType.cs +++ b/src/Artemis.Core/Models/Profile/DataBindings/Modes/DataBindingModifierType.cs @@ -21,9 +21,20 @@ namespace Artemis.Core public abstract IReadOnlyCollection CompatibleTypes { get; } /// - /// Gets or sets the description of this modifier + /// Gets the supported parameter type + /// If null, the parameter type will match the source property /// - public abstract string Description { get; } + public virtual Type ParameterType => null; + + /// + /// Gets or sets whether this modifier supports a parameter, defaults to true + /// + public virtual bool SupportsParameter => true; + + /// + /// Gets the name of this modifier + /// + public abstract string Name { get; } /// /// Gets or sets the icon of this modifier @@ -31,16 +42,15 @@ namespace Artemis.Core public abstract string Icon { get; } /// - /// Gets or sets whether this modifier supports a parameter, defaults to true + /// Gets the description of this modifier /// - public bool SupportsParameter { get; protected set; } = true; + public virtual string Description => null; /// - /// Gets or sets the preferred parameter type - /// If null, the parameter type will match the source property + /// Gets the category of this modifier /// - public Type PreferredParameterType { get; protected set; } = null; - + public virtual string Category => null; + /// /// Returns whether the given type is supported by the modifier /// diff --git a/src/Artemis.Core/Services/Registration/DataBindingService.cs b/src/Artemis.Core/Services/Registration/DataBindingService.cs index 3a82340c1..f3e9fa623 100644 --- a/src/Artemis.Core/Services/Registration/DataBindingService.cs +++ b/src/Artemis.Core/Services/Registration/DataBindingService.cs @@ -42,11 +42,38 @@ namespace Artemis.Core.Services private void RegisterBuiltInModifiers() { + // Numbers - General + RegisterModifierType(Constants.CorePluginInfo, new SumModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new SubtractModifierType()); RegisterModifierType(Constants.CorePluginInfo, new MultiplicationModifierType()); - RegisterModifierType(Constants.CorePluginInfo, new PercentageOfModifierType()); RegisterModifierType(Constants.CorePluginInfo, new DivideModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new PercentageOfModifierType()); + + // Numbers - Advanced + RegisterModifierType(Constants.CorePluginInfo, new MaxModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new MinModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new ModuloModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new AbsoluteModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new PowerModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new SquareRootModifierType()); + + // Numbers - Rounding RegisterModifierType(Constants.CorePluginInfo, new FloorModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new RoundModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new CeilingModifierType()); + + // Numbers - Trigonometric + RegisterModifierType(Constants.CorePluginInfo, new SineModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new CosineModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new TangentModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new CotangentModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new SecantModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new CosecantModifierType()); + + // Colors RegisterModifierType(Constants.CorePluginInfo, new SKColorSumModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new SKColorBrightenModifierType()); + RegisterModifierType(Constants.CorePluginInfo, new SKColorDarkenModifierType()); } } } \ No newline at end of file diff --git a/src/Artemis.Core/Stores/DataBindingModifierTypeStore.cs b/src/Artemis.Core/Stores/DataBindingModifierTypeStore.cs index ca19b2208..faa26230a 100644 --- a/src/Artemis.Core/Stores/DataBindingModifierTypeStore.cs +++ b/src/Artemis.Core/Stores/DataBindingModifierTypeStore.cs @@ -14,7 +14,7 @@ namespace Artemis.Core lock (Registrations) { if (Registrations.Any(r => r.DataBindingModifierType == modifierType)) - throw new ArtemisCoreException($"Data binding modifier type store already contains modifier '{modifierType.Description}'"); + throw new ArtemisCoreException($"Data binding modifier type store already contains modifier '{modifierType.Name}'"); typeRegistration = new DataBindingModifierTypeRegistration(modifierType, modifierType.PluginInfo.Instance) { IsInStore = true }; Registrations.Add(typeRegistration); @@ -29,7 +29,7 @@ namespace Artemis.Core lock (Registrations) { if (!Registrations.Contains(typeRegistration)) - throw new ArtemisCoreException($"Data binding modifier type store does not contain modifier type '{typeRegistration.DataBindingModifierType.Description}'"); + throw new ArtemisCoreException($"Data binding modifier type store does not contain modifier type '{typeRegistration.DataBindingModifierType.Name}'"); Registrations.Remove(typeRegistration); typeRegistration.IsInStore = false; @@ -56,7 +56,7 @@ namespace Artemis.Core var candidates = Registrations.Where(r => r.DataBindingModifierType.CompatibleTypes.Any(t => t == type)).ToList(); // If there are multiple operators with the same description, use the closest match - foreach (var displayDataBindingModifiers in candidates.GroupBy(r => r.DataBindingModifierType.Description).Where(g => g.Count() > 1).ToList()) + foreach (var displayDataBindingModifiers in candidates.GroupBy(r => r.DataBindingModifierType.Name).Where(g => g.Count() > 1).ToList()) { var closest = displayDataBindingModifiers.OrderByDescending(r => r.DataBindingModifierType.CompatibleTypes.Contains(type)).FirstOrDefault(); foreach (var displayDataBindingModifier in displayDataBindingModifiers) diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelDynamicView.xaml b/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelDynamicView.xaml index 3a3821f83..c28daabc1 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelDynamicView.xaml +++ b/src/Artemis.UI.Shared/DataModelVisualization/Input/DataModelDynamicView.xaml @@ -4,8 +4,6 @@ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:shared="clr-namespace:Artemis.UI.Shared" - xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes" - xmlns:s="https://github.com/canton7/Stylet" xmlns:input="clr-namespace:Artemis.UI.Shared.Input" mc:Ignorable="d" d:DesignHeight="450" d:DesignWidth="800" @@ -29,40 +27,35 @@ - - - - - - + \ No newline at end of file diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListPropertyViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListPropertyViewModel.cs index f612ec056..2ebea5675 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListPropertyViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListPropertyViewModel.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using System.Linq; using System.Reflection; using Artemis.Core.DataModelExpansions; diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListViewModel.cs index ff8f052a9..283e212db 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelListViewModel.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Reflection; using Artemis.Core; using Artemis.Core.DataModelExpansions; diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelPropertyViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelPropertyViewModel.cs index df82cecd7..b5f2fd2de 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelPropertyViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelPropertyViewModel.cs @@ -1,4 +1,6 @@ -using System.Linq; +using System; +using System.Collections.Generic; +using System.Linq; using System.Reflection; using Artemis.Core.DataModelExpansions; using Artemis.UI.Shared.Services; diff --git a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs index b799eed5e..25039c8fe 100644 --- a/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs +++ b/src/Artemis.UI.Shared/DataModelVisualization/Shared/DataModelVisualizationViewModel.cs @@ -1,5 +1,6 @@ using System; using System.Collections; +using System.Collections.Generic; using System.Linq; using System.Reflection; using Artemis.Core; @@ -169,7 +170,7 @@ namespace Artemis.UI.Shared IsMatchingFilteredTypes = false; return; } - + if (looseMatch) IsMatchingFilteredTypes = filteredTypes.Any(t => t.IsCastableFrom(PropertyInfo.PropertyType) || t == typeof(Enum) && PropertyInfo.PropertyType.IsEnum); else diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml index 46c8529f3..f28be532a 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeView.xaml @@ -1,13 +1,13 @@  @@ -78,7 +78,7 @@ - + diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeViewModel.cs index e3ea62a2a..03a50daa2 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/ConditionalDataBindingModeViewModel.cs @@ -11,8 +11,8 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio { public class ConditionalDataBindingModeViewModel : Screen, IDataBindingModeViewModel { - private readonly IProfileEditorService _profileEditorService; private readonly IDataBindingsVmFactory _dataBindingsVmFactory; + private readonly IProfileEditorService _profileEditorService; private bool _updating; public ConditionalDataBindingModeViewModel(ConditionalDataBinding conditionalDataBinding, @@ -36,12 +36,25 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio { UpdateConditionViewModels(); } - + public object GetTestValue() { throw new NotSupportedException(); } + #region IDisposable + + public void Dispose() + { + ConditionalDataBinding.ConditionsUpdated -= ConditionalDataBindingOnConditionsUpdated; + + foreach (var conditionViewModel in ConditionViewModels) + conditionViewModel.Dispose(); + ConditionViewModels.Clear(); + } + + #endregion + public void AddCondition(string type) { var condition = ConditionalDataBinding.AddCondition(); @@ -105,18 +118,5 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio { UpdateConditionViewModels(); } - - #region IDisposable - - public void Dispose() - { - ConditionalDataBinding.ConditionsUpdated -= ConditionalDataBindingOnConditionsUpdated; - - foreach (var conditionViewModel in ConditionViewModels) - conditionViewModel.Dispose(); - ConditionViewModels.Clear(); - } - - #endregion } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionViewModel.cs index b2cac837d..41cb52dd2 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/ConditionalDataBinding/DataBindingConditionViewModel.cs @@ -32,6 +32,15 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio ValueViewModel.Value = DataBindingCondition.Value; } + public DataBindingCondition DataBindingCondition { get; } + + public DataModelStaticViewModel ValueViewModel { get; set; } + + public void Dispose() + { + ValueViewModel.Dispose(); + } + private void ActiveItemOnUpdated(object sender, EventArgs e) { if (!ActiveItem.GetChildren().Any()) @@ -43,14 +52,5 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.Conditio DataBindingCondition.Value = (TProperty) Convert.ChangeType(e.Value, typeof(TProperty)); _profileEditorService.UpdateSelectedProfileElement(); } - - public DataBindingCondition DataBindingCondition { get; } - - public DataModelStaticViewModel ValueViewModel { get; set; } - - public void Dispose() - { - ValueViewModel.Dispose(); - } } } \ No newline at end of file diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml.cs index 61f02ab77..2808d7a97 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingView.xaml.cs @@ -1,5 +1,4 @@ -using System.Windows; -using System.Windows.Controls; +using System.Windows.Controls; namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings { diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs index 27c72d5c1..3897fa0fd 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingViewModel.cs @@ -12,16 +12,16 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings public class DataBindingViewModel : Conductor, IDataBindingViewModel { private readonly IDataBindingsVmFactory _dataBindingsVmFactory; - private readonly IProfileEditorService _profileEditorService; private readonly IDataModelUIService _dataModelUIService; + private readonly IProfileEditorService _profileEditorService; private DataBinding _dataBinding; private int _easingTime; + private bool _isDataBindingEnabled; private bool _isEasingTimeEnabled; private DataBindingModeType _selectedDataBindingMode; private TimelineEasingViewModel _selectedEasingViewModel; private bool _updating; - private bool _isDataBindingEnabled; public DataBindingViewModel(DataBindingRegistration registration, IProfileEditorService profileEditorService, @@ -219,9 +219,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings TestResultValue.UpdateValue(Registration.DataBinding != null ? Registration.DataBinding.GetValue(currentValue) : default); } else - { TestResultValue.UpdateValue(Registration.DataBinding != null ? Registration.DataBinding.GetValue(default) : default); - } } private void EnableDataBinding() diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs index 4473cba7b..d1ce4357c 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DataBindingsViewModel.cs @@ -26,6 +26,12 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings set => SetAndNotify(ref _selectedItemIndex, value); } + protected override void OnClose() + { + _profileEditorService.SelectedDataBindingChanged -= ProfileEditorServiceOnSelectedDataBindingChanged; + base.OnClose(); + } + private void CreateDataBindingViewModels() { Items.Clear(); @@ -44,12 +50,6 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings SelectedItemIndex = 0; } - protected override void OnClose() - { - _profileEditorService.SelectedDataBindingChanged -= ProfileEditorServiceOnSelectedDataBindingChanged; - base.OnClose(); - } - private void ProfileEditorServiceOnSelectedDataBindingChanged(object? sender, EventArgs e) { CreateDataBindingViewModels(); diff --git a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DirectDataBinding/DataBindingModifierView.xaml b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DirectDataBinding/DataBindingModifierView.xaml index 8a8ac38c2..dd6964260 100644 --- a/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DirectDataBinding/DataBindingModifierView.xaml +++ b/src/Artemis.UI/Screens/ProfileEditor/LayerProperties/DataBindings/DirectDataBinding/DataBindingModifierView.xaml @@ -8,9 +8,9 @@ xmlns:converters="clr-namespace:Artemis.UI.Converters" xmlns:utilities="clr-namespace:Artemis.UI.Utilities" xmlns:local="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DirectDataBinding" + xmlns:modifierTypes="clr-namespace:Artemis.UI.Screens.ProfileEditor.LayerProperties.DataBindings.DirectDataBinding.ModifierTypes" mc:Ignorable="d" - d:DesignHeight="450" d:DesignWidth="800" - d:DataContext="{d:DesignInstance local:DataBindingModifierViewModel}"> + d:DesignHeight="450" d:DesignWidth="800"> @@ -56,17 +56,33 @@ BorderBrush="#7B7B7B" Click="PropertyButton_OnClick"> - + - - - + + + + + + + + + + + + +