Datamodel - WIP stuff, need this on a diff. PC

This commit is contained in:
SpoinkyNL committed 2020-06-23 22:49:27 +02:00
1 parent 920aea6695
commit 2b7a507725
23 files changed
+392 -161

No files matched your search

@@ -10,13 +10,25 @@ namespace Artemis.Core.Models.Profile.Colors
{
public class ColorGradient : INotifyPropertyChanged
{
private float _rotation;
public ColorGradient()
{
Stops = new BindableCollection<ColorGradientStop>();
}
public BindableCollection<ColorGradientStop> Stops { get; }
public float Rotation { get; set; }
public float Rotation
{
get => _rotation;
set
{
if (value.Equals(_rotation)) return;
_rotation = value;
OnPropertyChanged();
}
}
public SKColor[] GetColorsArray()
{
@@ -7,14 +7,36 @@ namespace Artemis.Core.Models.Profile.Colors
{
public class ColorGradientStop : INotifyPropertyChanged
{
private SKColor _color;
private float _position;
public ColorGradientStop(SKColor color, float position)
{
Color = color;
Position = position;
}
public SKColor Color { get; set; }
public float Position { get; set; }
public SKColor Color
{
get => _color;
set
{
if (value.Equals(_color)) return;
_color = value;
OnPropertyChanged();
}
}
public float Position
{
get => _position;
set
{
if (value.Equals(_position)) return;
_position = value;
OnPropertyChanged();
}
}
#region PropertyChanged
@@ -13,8 +13,7 @@ namespace Artemis.Core.Models.Profile.LayerProperties
/// Represents a property on a layer. Properties are saved in storage and can optionally be modified from the UI.
/// <para>
/// Note: You cannot initialize layer properties yourself. If properly placed and annotated, the Artemis core will
/// initialize
/// these for you.
/// initialize these for you.
/// </para>
/// </summary>
/// <typeparam name="T">The type of property encapsulated in this layer property</typeparam>
@@ -44,7 +44,7 @@ namespace Artemis.Core.Models.Profile
public LayerPropertyGroup Parent { get; internal set; }
/// <summary>
/// Gets whether this property group's properties are all initialized
/// Gets whether this property groups properties are all initialized
/// </summary>
public bool PropertiesInitialized { get; private set; }