mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Core - Flattened namespaces
Shared UI - Flattened namespaces Shared UI - General housekeeping Project - Code cleanup
This commit is contained in:
1 parent
029e39ec1d
commit
8718d01eae
454 files changed
+1678
-1938
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Attributes
|
||||
namespace Artemis.Core
|
||||
{
|
||||
public class PropertyDescriptionAttribute : Attribute
|
||||
{
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Attributes
|
||||
namespace Artemis.Core
|
||||
{
|
||||
public class PropertyGroupDescriptionAttribute : Attribute
|
||||
{
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Events;
|
||||
using Artemis.Core.Models.Profile.LayerProperties.Attributes;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// For internal use only, to implement your own layer property type, extend <see cref="LayerProperty{T}" /> instead.
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using Artemis.Core.Utilities;
|
||||
using Stylet;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// For internal use only, use <see cref="LayerPropertyKeyframe{T}" /> instead.
|
||||
|
||||
@@ -3,12 +3,10 @@ using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Utilities;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a property on a layer. Properties are saved in storage and can optionally be modified from the UI.
|
||||
@@ -175,7 +173,10 @@ namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override Type GetPropertyType() => typeof(T);
|
||||
public override Type GetPropertyType()
|
||||
{
|
||||
return typeof(T);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override List<PropertyInfo> GetDataBindingProperties()
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using System;
|
||||
using Artemis.Core.Utilities;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties
|
||||
namespace Artemis.Core
|
||||
{
|
||||
public class LayerPropertyKeyframe<T> : BaseLayerPropertyKeyframe
|
||||
{
|
||||
private LayerProperty<T> _layerProperty;
|
||||
private TimeSpan _position;
|
||||
private T _value;
|
||||
private LayerProperty<T> _layerProperty;
|
||||
|
||||
public LayerPropertyKeyframe(T value, TimeSpan position, Easings.Functions easingFunction, LayerProperty<T> layerProperty) : base(layerProperty)
|
||||
{
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Models.Profile.Colors;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
using Artemis.Storage.Entities.Profile;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class ColorGradientLayerProperty : LayerProperty<ColorGradient>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using System;
|
||||
using Artemis.Core.Exceptions;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class EnumLayerProperty<T> : LayerProperty<T> where T : Enum
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class FloatLayerProperty : LayerProperty<float>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class IntLayerProperty : LayerProperty<int>
|
||||
|
||||
+1
-3
@@ -1,6 +1,4 @@
|
||||
using Artemis.Core.Exceptions;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// A special layer property used to configure the selected layer brush
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
using System;
|
||||
using Artemis.Core.Extensions;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class SKColorLayerProperty : LayerProperty<SKColor>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class SKPointLayerProperty : LayerProperty<SKPoint>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Linq;
|
||||
using System.Reflection;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public class SKSizeLayerProperty : LayerProperty<SKSize>
|
||||
@@ -17,16 +17,16 @@ namespace Artemis.Core.Models.Profile.LayerProperties.Types
|
||||
return p.CurrentValue;
|
||||
}
|
||||
|
||||
public override List<PropertyInfo> GetDataBindingProperties()
|
||||
{
|
||||
return typeof(SKSize).GetProperties().Where(p => p.CanWrite).ToList();
|
||||
}
|
||||
|
||||
protected override void UpdateCurrentValue(float keyframeProgress, float keyframeProgressEased)
|
||||
{
|
||||
var widthDiff = NextKeyframe.Value.Width - CurrentKeyframe.Value.Width;
|
||||
var heightDiff = NextKeyframe.Value.Height - CurrentKeyframe.Value.Height;
|
||||
CurrentValue = new SKSize(CurrentKeyframe.Value.Width + widthDiff * keyframeProgressEased, CurrentKeyframe.Value.Height + heightDiff * keyframeProgressEased);
|
||||
}
|
||||
|
||||
public override List<PropertyInfo> GetDataBindingProperties()
|
||||
{
|
||||
return typeof(SKSize).GetProperties().Where(p => p.CanWrite).ToList();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user