mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2025-12-12 17:48:31 +00:00
Replaced effects with decorators.
Decorators should be way more flexible while beeing easy to use.
This commit is contained in:
parent
1f3213fa73
commit
2086b3729d
@ -1,17 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>RGB.NET.Effects</id>
|
||||
<title>RGB.NET.Effects</title>
|
||||
<id>RGB.NET.Decorators</id>
|
||||
<title>RGB.NET.Decorators</title>
|
||||
<version>1.0.0.0</version>
|
||||
<authors>Darth Affe</authors>
|
||||
<owners>Darth Affe</owners>
|
||||
<projectUrl>https://github.com/DarthAffe/RGB.NET</projectUrl>
|
||||
<licenseUrl>https://raw.githubusercontent.com/DarthAffe/RGB.NET/master/LICENSE</licenseUrl>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>Effects-Presets of RGB.NET</description>
|
||||
<description>Decorators-Presets of RGB.NET</description>
|
||||
<releaseNotes></releaseNotes>
|
||||
<summary>Effects-Presets of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals</summary>
|
||||
<summary>Decorators-Presets of RGB.NET, a C# (.NET) library for accessing various RGB-peripherals</summary>
|
||||
<copyright>Copyright © Wyrez 2017</copyright>
|
||||
<language>en-US</language>
|
||||
<dependencies>
|
||||
@ -21,9 +21,9 @@
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="..\bin\RGB.NET.Effects.dll" target="lib\net45\RGB.NET.Effects.dll" />
|
||||
<file src="..\bin\RGB.NET.Effects.pdb" target="lib\net45\RGB.NET.Effects.pdb" />
|
||||
<file src="..\bin\RGB.NET.Effects.xml" target="lib\net45\RGB.NET.Effects.xml" />
|
||||
<file src="..\RGB.NET.Effects\**\*.cs" target="src" exclude="..\RGB.NET.Effects\obj\**\*.*" />
|
||||
<file src="..\bin\RGB.NET.Decorators.dll" target="lib\net45\RGB.NET.Decorators.dll" />
|
||||
<file src="..\bin\RGB.NET.Decorators.pdb" target="lib\net45\RGB.NET.Decorators.pdb" />
|
||||
<file src="..\bin\RGB.NET.Decorators.xml" target="lib\net45\RGB.NET.Decorators.xml" />
|
||||
<file src="..\RGB.NET.Decorators\**\*.cs" target="src" exclude="..\RGB.NET.Decorators\obj\**\*.*" />
|
||||
</files>
|
||||
</package>
|
||||
11
RGB.NET.Brushes/Decorators/IGradientDecorator.cs
Normal file
11
RGB.NET.Brushes/Decorators/IGradientDecorator.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using RGB.NET.Brushes.Gradients;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Brushes
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic decorator decorating a <see cref="IGradient"/>.
|
||||
/// </summary>
|
||||
public interface IGradientDecorator : IDecorator
|
||||
{ }
|
||||
}
|
||||
@ -11,7 +11,7 @@ namespace RGB.NET.Brushes.Gradients
|
||||
/// <summary>
|
||||
/// Represents a basic gradient.
|
||||
/// </summary>
|
||||
public abstract class AbstractGradient : IGradient
|
||||
public abstract class AbstractGradient : AbstractDecoratable<IGradientDecorator>, IGradient
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@ namespace RGB.NET.Brushes.Gradients
|
||||
/// <summary>
|
||||
/// Represents a basic gradient.
|
||||
/// </summary>
|
||||
public interface IGradient
|
||||
public interface IGradient : IDecoratable<IGradientDecorator>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the <see cref="Color"/> of the <see cref="IGradient"/> on the specified offset.
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Brushes.Gradients
|
||||
/// Represents a rainbow gradient which circles through all colors of the HUE-color-space.<br />
|
||||
/// See <see href="http://upload.wikimedia.org/wikipedia/commons/a/ad/HueScale.svg" /> as reference.
|
||||
/// </summary>
|
||||
public class RainbowGradient : IGradient
|
||||
public class RainbowGradient : AbstractDecoratable<IGradientDecorator>, IGradient
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
<Compile Include="Gradients\AbstractGradient.cs" />
|
||||
<Compile Include="Gradients\GradientStop.cs" />
|
||||
<Compile Include="Gradients\IGradient.cs" />
|
||||
<Compile Include="Decorators\IGradientDecorator.cs" />
|
||||
<Compile Include="Gradients\LinearGradient.cs" />
|
||||
<Compile Include="Gradients\RainbowGradient.cs" />
|
||||
<Compile Include="Helper\GradientHelper.cs" />
|
||||
|
||||
@ -1,2 +1,3 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=brushes/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=brushes/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=decorators/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@ -2,6 +2,7 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable VirtualMemberNeverOverridden.Global
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
@ -10,7 +11,7 @@ namespace RGB.NET.Core
|
||||
/// <summary>
|
||||
/// Represents a basic brush.
|
||||
/// </summary>
|
||||
public abstract class AbstractBrush : AbstractEffectTarget<IBrush>, IBrush
|
||||
public abstract class AbstractBrush : AbstractDecoratable<IBrushDecorator>, IBrush
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
@ -35,9 +36,6 @@ namespace RGB.NET.Core
|
||||
/// <inheritdoc />
|
||||
public Dictionary<BrushRenderTarget, Color> RenderedTargets { get; } = new Dictionary<BrushRenderTarget, Color>();
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override IBrush EffectTarget => this;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
@ -57,23 +55,34 @@ namespace RGB.NET.Core
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Performas the render pass of the brush and calculates the raw colors for all requested points.
|
||||
/// </summary>
|
||||
/// <param name="rectangle">The rectangle in which the brush should be drawn.</param>
|
||||
/// <param name="renderTargets">The targets (keys/points) of which the color should be calculated.</param>
|
||||
/// <inheritdoc />
|
||||
public virtual void PerformRender(Rectangle rectangle, IEnumerable<BrushRenderTarget> renderTargets)
|
||||
{
|
||||
RenderedRectangle = rectangle;
|
||||
RenderedTargets.Clear();
|
||||
|
||||
foreach (BrushRenderTarget point in renderTargets)
|
||||
RenderedTargets[point] = new Color(GetColorAtPoint(rectangle, point)); // Clone the color, we don't want to have reference issues here and brushes might return the same color multiple times!
|
||||
foreach (BrushRenderTarget renderTarget in renderTargets)
|
||||
{
|
||||
Color color = new Color(GetColorAtPoint(rectangle, renderTarget)); // Clone the color, we don't want to have reference issues here and brushes might return the same color multiple times!}
|
||||
ApplyDecorators(rectangle, renderTarget, ref color);
|
||||
RenderedTargets[renderTarget] = color;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Performs the finalize pass of the brush and calculates the final colors for all previously calculated points.
|
||||
/// Applies all attached and enabled decorators to the brush.
|
||||
/// </summary>
|
||||
/// <param name="rectangle">The rectangle in which the brush should be drawn.</param>
|
||||
/// <param name="renderTarget">The target (key/point) from which the color should be taken.</param>
|
||||
/// <param name="color">The <see cref="Color"/> to be modified.</param>
|
||||
protected virtual void ApplyDecorators(Rectangle rectangle, BrushRenderTarget renderTarget, ref Color color)
|
||||
{
|
||||
foreach (IBrushDecorator decorator in Decorators)
|
||||
if (decorator.IsEnabled)
|
||||
decorator.ManipulateColor(rectangle, renderTarget, ref color);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void PerformFinalize()
|
||||
{
|
||||
List<BrushRenderTarget> renderTargets = RenderedTargets.Keys.ToList();
|
||||
|
||||
@ -9,7 +9,7 @@ namespace RGB.NET.Core
|
||||
/// <summary>
|
||||
/// Represents a basic brush.
|
||||
/// </summary>
|
||||
public interface IBrush : IEffectTarget<IBrush>
|
||||
public interface IBrush : IDecoratable<IBrushDecorator>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="IBrush"/> is enabled and will be drawn on an update.
|
||||
|
||||
58
RGB.NET.Core/Decorators/AbstractDecorator.cs
Normal file
58
RGB.NET.Core/Decorators/AbstractDecorator.cs
Normal file
@ -0,0 +1,58 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public abstract class AbstractDecorator : AbstractBindable, IDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private bool _isEnabled = true;
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled
|
||||
{
|
||||
get => _isEnabled;
|
||||
set => SetProperty(ref _isEnabled, value);
|
||||
}
|
||||
|
||||
private int _order;
|
||||
/// <inheritdoc />
|
||||
public int Order
|
||||
{
|
||||
get => _order;
|
||||
set => SetProperty(ref _order, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets a readonly-list of all <see cref="IDecoratable"/> this decorator is attached to.
|
||||
/// </summary>
|
||||
protected List<IDecoratable> DecoratedObjects { get; } = new List<IDecoratable>();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnAttached(IDecoratable decoratable) => DecoratedObjects.Add(decoratable);
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnDetached(IDecoratable decoratable) => DecoratedObjects.Remove(decoratable);
|
||||
|
||||
/// <summary>
|
||||
/// Detaches the decorator from all <see cref="IDecoratable"/> it is currently attached to.
|
||||
/// </summary>
|
||||
/// <typeparam name="TDecoratable">The type of the <see cref="IDecoratable"/> this decorator is attached to.</typeparam>
|
||||
/// <typeparam name="TDecorator">The type of this <see cref="IDecorator"/>.</typeparam>
|
||||
protected virtual void Detach<TDecoratable, TDecorator>()
|
||||
where TDecoratable : IDecoratable<TDecorator>
|
||||
where TDecorator : AbstractDecorator
|
||||
{
|
||||
List<IDecoratable> decoratables = new List<IDecoratable>(DecoratedObjects);
|
||||
foreach (IDecoratable decoratable in decoratables)
|
||||
if (decoratable is TDecoratable typedDecoratable)
|
||||
typedDecoratable.RemoveDecorator((TDecorator)this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
42
RGB.NET.Core/Decorators/AbstractIDecorateable.cs
Normal file
42
RGB.NET.Core/Decorators/AbstractIDecorateable.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public abstract class AbstractDecoratable<T> : AbstractBindable, IDecoratable<T>
|
||||
where T : IDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
private List<T> _decorators = new List<T>();
|
||||
/// <summary>
|
||||
/// Gets a readonly-list of all <see cref="IDecorator"/> attached to this <see cref="IDecoratable{T}"/>.
|
||||
/// </summary>
|
||||
protected IReadOnlyCollection<T> Decorators => new ReadOnlyCollection<T>(_decorators);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public void AddDecorator(T decorator)
|
||||
{
|
||||
_decorators.Add(decorator);
|
||||
_decorators = _decorators.OrderByDescending(x => x.Order).ToList();
|
||||
|
||||
decorator.OnAttached(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void RemoveDecorator(T decorator)
|
||||
{
|
||||
_decorators.Remove(decorator);
|
||||
|
||||
decorator.OnDetached(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
64
RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs
Normal file
64
RGB.NET.Core/Decorators/AbstractUpdateAwareDecorator.cs
Normal file
@ -0,0 +1,64 @@
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic decorator which is aware of the <see cref="RGBSurface.Updating"/> event.
|
||||
/// </summary>
|
||||
public abstract class AbstractUpdateAwareDecorator : AbstractDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="AbstractUpdateAwareDecorator"/> should call <see cref="Update"/> even if the Decorator is disabled.
|
||||
/// </summary>
|
||||
protected bool UpdateIfDisabled { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="AbstractUpdateAwareDecorator"/> class.
|
||||
/// </summary>
|
||||
/// <param name="updateIfDisabled">Bool indicating if the <see cref="AbstractUpdateAwareDecorator"/> should call <see cref="Update"/> even if the Decorator is disabled.</param>
|
||||
public AbstractUpdateAwareDecorator(bool updateIfDisabled = false)
|
||||
{
|
||||
this.UpdateIfDisabled = updateIfDisabled;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnAttached(IDecoratable decoratable)
|
||||
{
|
||||
if (DecoratedObjects.Count == 0)
|
||||
RGBSurface.Instance.Updating += OnSurfaceUpdating;
|
||||
|
||||
base.OnAttached(decoratable);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnDetached(IDecoratable decoratable)
|
||||
{
|
||||
base.OnDetached(decoratable);
|
||||
|
||||
if (DecoratedObjects.Count == 0)
|
||||
RGBSurface.Instance.Updating -= OnSurfaceUpdating;
|
||||
}
|
||||
|
||||
private void OnSurfaceUpdating(UpdatingEventArgs args)
|
||||
{
|
||||
if (IsEnabled || UpdateIfDisabled)
|
||||
Update(args.DeltaTime);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updates this <see cref="AbstractUpdateAwareDecorator"/>.
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">The elapsed time (in seconds) since the last update.</param>
|
||||
protected abstract void Update(double deltaTime);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
17
RGB.NET.Core/Decorators/IBrushDecorator.cs
Normal file
17
RGB.NET.Core/Decorators/IBrushDecorator.cs
Normal file
@ -0,0 +1,17 @@
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Represents a <see cref="T:RGB.NET.Core.IDecorator" /> decorating a <see cref="T:RGB.NET.Core.IBrush" />.
|
||||
/// </summary>
|
||||
public interface IBrushDecorator : IDecorator
|
||||
{
|
||||
/// <summary>
|
||||
/// Decorator-Method called by the <see cref="IBrush"/>.
|
||||
/// </summary>
|
||||
/// <param name="rectangle">The rectangle in which the <see cref="IBrush"/> should be drawn.</param>
|
||||
/// <param name="renderTarget">The target (key/point) from which the <see cref="Color"/> should be taken.</param>
|
||||
/// <param name="color">The <see cref="Color"/> to be modified.</param>
|
||||
void ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, ref Color color);
|
||||
}
|
||||
}
|
||||
29
RGB.NET.Core/Decorators/IDecoratable.cs
Normal file
29
RGB.NET.Core/Decorators/IDecoratable.cs
Normal file
@ -0,0 +1,29 @@
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic decoratable.
|
||||
/// </summary>
|
||||
public interface IDecoratable
|
||||
{ }
|
||||
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// Represents a basic decoratable for a specific type of <see cref="T:RGB.NET.Core.IDecorator" />
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public interface IDecoratable<in T> : IDecoratable
|
||||
where T : IDecorator
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds an <see cref="IDecorator"/> to the <see cref="IDecoratable"/>.
|
||||
/// </summary>
|
||||
/// <param name="decorator">The <see cref="IDecorator"/> to be added.</param>
|
||||
void AddDecorator(T decorator);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an <see cref="IDecorator"/> from the <see cref="IDecoratable"/>.
|
||||
/// </summary>
|
||||
/// <param name="decorator">The <see cref="IDecorator"/> to be removed.</param>
|
||||
void RemoveDecorator(T decorator);
|
||||
}
|
||||
}
|
||||
39
RGB.NET.Core/Decorators/IDecorator.cs
Normal file
39
RGB.NET.Core/Decorators/IDecorator.cs
Normal file
@ -0,0 +1,39 @@
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic decorator.
|
||||
/// </summary>
|
||||
public interface IDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="IDecorator"/> is enabled and will be used.
|
||||
/// </summary>
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the order in which multiple decorators should be applied on the same object.
|
||||
/// Higher orders are processed first.
|
||||
/// </summary>
|
||||
int Order { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Attaches this <see cref="IDecorator"/> to the given target.
|
||||
/// </summary>
|
||||
/// <param name="decoratable">The object this <see cref="IDecorator"/> should be attached to.</param>
|
||||
void OnAttached(IDecoratable decoratable);
|
||||
|
||||
/// <summary>
|
||||
/// Detaches this <see cref="IDecorator"/> from the given target.
|
||||
/// </summary>
|
||||
/// <param name="decoratable">The object this <see cref="IDecorator"/> should be detached from.</param>
|
||||
void OnDetached(IDecoratable decoratable);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
8
RGB.NET.Core/Decorators/ILedGroupDecorator.cs
Normal file
8
RGB.NET.Core/Decorators/ILedGroupDecorator.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic decorator decorating a <see cref="ILedGroup"/>.
|
||||
/// </summary>
|
||||
public interface ILedGroupDecorator : IDecorator
|
||||
{ }
|
||||
}
|
||||
@ -1,57 +0,0 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic effect targeting an <see cref="IBrush"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractBrushEffect<T> : IEffect<IBrush>
|
||||
where T : IBrush
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsDone { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="IBrush"/> this effect is targeting.
|
||||
/// </summary>
|
||||
protected T Brush { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract void Update(double deltaTime);
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual bool CanBeAppliedTo(IBrush target)
|
||||
{
|
||||
return target is T;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnAttach(IBrush target)
|
||||
{
|
||||
Brush = (T)target;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnDetach(IBrush target)
|
||||
{
|
||||
Brush = default(T);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a basic effect targeting an <see cref="IBrush"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractBrushEffect : AbstractBrushEffect<IBrush>
|
||||
{ }
|
||||
}
|
||||
@ -1,122 +0,0 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using RGB.NET.Core.Exceptions;
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an generic effect-target.
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
public abstract class AbstractEffectTarget<T> : IEffectTarget<T>
|
||||
where T : IEffectTarget<T>
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of <see cref="EffectTimeContainer"/> storing the attached effects.
|
||||
/// </summary>
|
||||
protected IList<EffectTimeContainer> EffectTimes { get; } = new List<EffectTimeContainer>();
|
||||
|
||||
/// <summary>
|
||||
/// Gets all <see cref="IEffect{T}" /> attached to this <see cref="IEffectTarget{T}"/>.
|
||||
/// </summary>
|
||||
protected IList<IEffect<T>> InternalEffects => EffectTimes.Select(x => x.Effect).Cast<IEffect<T>>().ToList();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<IEffect<T>> Effects => new ReadOnlyCollection<IEffect<T>>(InternalEffects);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the strongly-typed target used for the <see cref="IEffect{T}"/>.
|
||||
/// </summary>
|
||||
protected abstract T EffectTarget { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Updates all <see cref="IEffect"/> added to this <see cref="IEffectTarget{T}"/>.
|
||||
/// </summary>
|
||||
public virtual void UpdateEffects()
|
||||
{
|
||||
lock (InternalEffects)
|
||||
{
|
||||
for (int i = EffectTimes.Count - 1; i >= 0; i--)
|
||||
{
|
||||
long currentTicks = DateTime.Now.Ticks;
|
||||
|
||||
EffectTimeContainer effectTime = EffectTimes[i];
|
||||
if (!effectTime.Effect.IsEnabled)
|
||||
{
|
||||
effectTime.TicksAtLastUpdate = currentTicks;
|
||||
continue;
|
||||
}
|
||||
|
||||
double deltaTime;
|
||||
if (effectTime.TicksAtLastUpdate < 0)
|
||||
{
|
||||
effectTime.TicksAtLastUpdate = currentTicks;
|
||||
deltaTime = 0;
|
||||
}
|
||||
else
|
||||
deltaTime = (currentTicks - effectTime.TicksAtLastUpdate) / 10000000.0;
|
||||
|
||||
effectTime.TicksAtLastUpdate = currentTicks;
|
||||
effectTime.Effect.Update(deltaTime);
|
||||
|
||||
if (effectTime.Effect.IsDone)
|
||||
EffectTimes.RemoveAt(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds an <see cref="IEffect{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="effect">The <see cref="IEffect{T}"/> to add.</param>
|
||||
public virtual void AddEffect(IEffect<T> effect)
|
||||
{
|
||||
if (EffectTimes.Any(x => x.Effect == effect)) return;
|
||||
|
||||
if (!effect.CanBeAppliedTo(EffectTarget))
|
||||
throw new EffectException($"Failed to add effect.\r\n" +
|
||||
$"The effect of type '{effect.GetType()}' can't be applied to the target of type '{EffectTarget.GetType()}'.");
|
||||
|
||||
effect.OnAttach(EffectTarget);
|
||||
EffectTimes.Add(new EffectTimeContainer(effect, -1));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes an <see cref="IEffect{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="effect">The <see cref="IEffect{T}"/> to remove.</param>
|
||||
public virtual void RemoveEffect(IEffect<T> effect)
|
||||
{
|
||||
EffectTimeContainer effectTimeToRemove = EffectTimes.FirstOrDefault(x => x.Effect == effect);
|
||||
if (effectTimeToRemove == null) return;
|
||||
|
||||
effect.OnDetach(EffectTarget);
|
||||
EffectTimes.Remove(effectTimeToRemove);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasEffect(IEffect<T> effect)
|
||||
{
|
||||
return InternalEffects.Contains(effect);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool HasEffect<TEffect>()
|
||||
where TEffect : IEffect
|
||||
{
|
||||
return InternalEffects.Any(x => x.GetType() == typeof(TEffect));
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,59 +0,0 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic effect targeting an <see cref="ILedGroup"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractLedGroupEffect<T> : IEffect<ILedGroup>
|
||||
where T : ILedGroup
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsEnabled { get; set; } = true;
|
||||
|
||||
/// <inheritdoc />
|
||||
public bool IsDone { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the <see cref="ILedGroup"/> this effect is targeting.
|
||||
/// </summary>
|
||||
protected T LedGroup { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public abstract void Update(double deltaTime);
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual bool CanBeAppliedTo(ILedGroup target)
|
||||
{
|
||||
return target is T;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnAttach(ILedGroup target)
|
||||
{
|
||||
LedGroup = (T)target;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public virtual void OnDetach(ILedGroup target)
|
||||
{
|
||||
LedGroup = default(T);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a basic effect targeting an <see cref="ILedGroup"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractLedGroupEffect : AbstractLedGroupEffect<ILedGroup>
|
||||
{ }
|
||||
}
|
||||
@ -1,40 +0,0 @@
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a wrapped effect with additional time information.
|
||||
/// </summary>
|
||||
public class EffectTimeContainer
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the wrapped <see cref="IEffect"/>.
|
||||
/// </summary>
|
||||
public IEffect Effect { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tick-count from the last time the <see cref="IEffect"/> was updated.
|
||||
/// </summary>
|
||||
public long TicksAtLastUpdate { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EffectTimeContainer"/> class.
|
||||
/// </summary>
|
||||
/// <param name="effect">The wrapped <see cref="IEffect"/>.</param>
|
||||
/// <param name="ticksAtLastUpdate">The tick-count from the last time the <see cref="IEffect"/> was updated.</param>
|
||||
public EffectTimeContainer(IEffect effect, long ticksAtLastUpdate)
|
||||
{
|
||||
this.Effect = effect;
|
||||
this.TicksAtLastUpdate = ticksAtLastUpdate;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,67 +0,0 @@
|
||||
// ReSharper disable UnusedMember.Global
|
||||
// ReSharper disable UnusedMemberInSuper.Global
|
||||
// ReSharper disable UnusedParameter.Global
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic effect.
|
||||
/// </summary>
|
||||
public interface IEffect
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets if the <see cref="IEffect"/> is enabled and will be updated.
|
||||
/// </summary>
|
||||
bool IsEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets if this <see cref="IEffect"/> has finished all of his work.
|
||||
/// </summary>
|
||||
bool IsDone { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Updates this <see cref="IEffect"/>.
|
||||
/// </summary>
|
||||
/// <param name="deltaTime">The elapsed time (in seconds) since the last update.</param>
|
||||
void Update(double deltaTime);
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a basic effect.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type of <see cref="IEffectTarget{T}"/> this effect can be attached to.</typeparam>
|
||||
public interface IEffect<in T> : IEffect
|
||||
where T : IEffectTarget<T>
|
||||
{
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the <see cref="IEffect{T}"/> can be applied to the target object.
|
||||
/// </summary>
|
||||
/// <param name="target">The <see cref="IEffectTarget{T}"/> this effect is attached to.</param>
|
||||
/// <returns><c>true</c> if the <see cref="IEffectTarget{T}"/> can be attached; otherwise, <c>false</c>.</returns>
|
||||
bool CanBeAppliedTo(T target);
|
||||
|
||||
/// <summary>
|
||||
/// Hook which is called when the <see cref="IEffect{T}"/> is attached to a <see cref="IRGBDevice"/>.
|
||||
/// </summary>
|
||||
/// <param name="target">The <see cref="IEffectTarget{T}"/> this effect is attached to.</param>
|
||||
void OnAttach(T target);
|
||||
|
||||
/// <summary>
|
||||
/// Hook which is called when the <see cref="IEffect{T}"/> is detached from a <see cref="IRGBDevice"/>.
|
||||
/// </summary>
|
||||
/// <param name="target">The <see cref="IEffectTarget{T}"/> this effect is detached from.</param>
|
||||
void OnDetach(T target);
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,58 +0,0 @@
|
||||
// ReSharper disable UnusedMember.Global
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace RGB.NET.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a basic effect-target.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The type this target represents.</typeparam>
|
||||
public interface IEffectTarget<T>
|
||||
where T : IEffectTarget<T>
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets a readonly collection of all <see cref="IEffect{T}"/> of this <see cref="IEffectTarget{T}"/>.
|
||||
/// </summary>
|
||||
IEnumerable<IEffect<T>> Effects { get; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Updates all <see cref="IEffect{T}"/> added to this target.
|
||||
/// </summary>
|
||||
void UpdateEffects();
|
||||
|
||||
/// <summary>
|
||||
/// Adds an <see cref="IEffect{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="effect">The <see cref="IEffect{T}"/> to add.</param>
|
||||
void AddEffect(IEffect<T> effect);
|
||||
|
||||
/// <summary>
|
||||
/// Removes an <see cref="IEffect{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="effect">The <see cref="IEffect{T}"/> to remove.</param>
|
||||
void RemoveEffect(IEffect<T> effect);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if the <see cref="IEffect{T}"/> is added to this <see cref="IEffectTarget{T}"/>.
|
||||
/// </summary>
|
||||
/// <param name="effect">The <see cref="IEffect{T}"/> to check.</param>
|
||||
/// <returns><c>true</c> if the <see cref="IEffect{T}"/> is added to this <see cref="IEffectTarget{T}"/>.; otherwise, <c>false</c>.</returns>
|
||||
bool HasEffect(IEffect<T> effect);
|
||||
|
||||
/// <summary>
|
||||
/// Checks if any <see cref="IEffect{T}"/> of the provided generic type is added to this <see cref="IEffectTarget{T}"/>.
|
||||
/// </summary>
|
||||
/// <typeparam name="TEffect">The generic type of the <see cref="IEffect{T}"/> to check.</typeparam>
|
||||
/// <returns><c>true</c> if any <see cref="IEffect{T}"/> of the provided type is added to this <see cref="IEffectTarget{T}"/>.; otherwise, <c>false</c>.</returns>
|
||||
bool HasEffect<TEffect>() where TEffect : IEffect;
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -1,23 +0,0 @@
|
||||
using System;
|
||||
|
||||
namespace RGB.NET.Core.Exceptions
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an exception thrown by an <see cref="IEffect"/>.
|
||||
/// </summary>
|
||||
public class EffectException : ApplicationException
|
||||
{
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="EffectException"/> class.
|
||||
/// </summary>
|
||||
/// <param name="message">The message which describes the reason of throwing this exception.</param>
|
||||
/// <param name="innerException">Optional inner exception, which lead to this exception.</param>
|
||||
public EffectException(string message, Exception innerException = null)
|
||||
: base(message, innerException)
|
||||
{ }
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -5,15 +5,10 @@ namespace RGB.NET.Core
|
||||
/// <summary>
|
||||
/// Represents a generic <see cref="AbstractLedGroup"/>.
|
||||
/// </summary>
|
||||
public abstract class AbstractLedGroup : AbstractEffectTarget<ILedGroup>, ILedGroup
|
||||
public abstract class AbstractLedGroup : AbstractDecoratable<ILedGroupDecorator>, ILedGroup
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets the strongly-typed target used for the effect.
|
||||
/// </summary>
|
||||
protected override ILedGroup EffectTarget => this;
|
||||
|
||||
/// <inheritdoc />
|
||||
public IBrush Brush { get; set; }
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ namespace RGB.NET.Core
|
||||
/// <summary>
|
||||
/// Represents a generic ledgroup.
|
||||
/// </summary>
|
||||
public interface ILedGroup : IEffectTarget<ILedGroup>
|
||||
public interface ILedGroup : IDecoratable<ILedGroupDecorator>
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="IBrush"/> which should be drawn over this <see cref="ILedGroup"/>.
|
||||
|
||||
@ -78,8 +78,19 @@ namespace RGB.NET.Core
|
||||
|
||||
#region Events
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when a the <see cref="Location"/> of the <see cref="Rectangle"/> changes.
|
||||
/// </summary>
|
||||
public event EventHandler LocationChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when a the <see cref="Size"/> of the <see cref="Rectangle"/> changes.
|
||||
/// </summary>
|
||||
public event EventHandler SizeChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when the <see cref="Location"/> or the <see cref="Size"/> of the <see cref="Rectangle"/> changes.
|
||||
/// </summary>
|
||||
public event EventHandler Changed;
|
||||
|
||||
#endregion
|
||||
|
||||
@ -50,6 +50,13 @@
|
||||
<Compile Include="Brushes\BrushRenderTarget.cs" />
|
||||
<Compile Include="Brushes\IBrush.cs" />
|
||||
<Compile Include="ColorCorrection\IColorCorrection.cs" />
|
||||
<Compile Include="Decorators\AbstractIDecorateable.cs" />
|
||||
<Compile Include="Decorators\AbstractDecorator.cs" />
|
||||
<Compile Include="Decorators\AbstractUpdateAwareDecorator.cs" />
|
||||
<Compile Include="Decorators\IBrushDecorator.cs" />
|
||||
<Compile Include="Decorators\IDecoratable.cs" />
|
||||
<Compile Include="Decorators\IDecorator.cs" />
|
||||
<Compile Include="Decorators\ILedGroupDecorator.cs" />
|
||||
<Compile Include="Devices\AbstractRGBDevice.cs" />
|
||||
<Compile Include="Devices\IRGBDeviceSpecialPart.cs" />
|
||||
<Compile Include="Devices\Layout\LedImage.cs" />
|
||||
@ -63,17 +70,10 @@
|
||||
<Compile Include="Devices\RGBDeviceType.cs" />
|
||||
<Compile Include="Devices\IRGBDeviceProvider.cs" />
|
||||
<Compile Include="Devices\IRGBDeviceInfo.cs" />
|
||||
<Compile Include="Effects\AbstractBrushEffect.cs" />
|
||||
<Compile Include="Effects\AbstractEffectTarget.cs" />
|
||||
<Compile Include="Effects\AbstractLedGroupEffect.cs" />
|
||||
<Compile Include="Effects\EffectTimeContainer.cs" />
|
||||
<Compile Include="Effects\IEffect.cs" />
|
||||
<Compile Include="Effects\IEffectTarget.cs" />
|
||||
<Compile Include="Events\ExceptionEventArgs.cs" />
|
||||
<Compile Include="Events\SurfaceLayoutChangedEventArgs.cs" />
|
||||
<Compile Include="Events\UpdatedEventArgs.cs" />
|
||||
<Compile Include="Events\UpdatingEventArgs.cs" />
|
||||
<Compile Include="Exceptions\EffectException.cs" />
|
||||
<Compile Include="Exceptions\RGBDeviceException.cs" />
|
||||
<Compile Include="Groups\AbstractLedGroup.cs" />
|
||||
<Compile Include="Groups\ILedGroup.cs" />
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=brushes/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=colorcorrection/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=decorators/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=devices/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=effects/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=events/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||
@ -76,11 +76,6 @@ namespace RGB.NET.Core
|
||||
|
||||
lock (_ledGroups)
|
||||
{
|
||||
// Update effects
|
||||
foreach (ILedGroup ledGroup in _ledGroups)
|
||||
try { ledGroup.UpdateEffects(); }
|
||||
catch (Exception ex) { OnException(ex); }
|
||||
|
||||
// Render brushes
|
||||
foreach (ILedGroup ledGroup in _ledGroups.OrderBy(x => x.ZIndex))
|
||||
try { Render(ledGroup); }
|
||||
@ -142,7 +137,7 @@ namespace RGB.NET.Core
|
||||
throw new ArgumentException();
|
||||
}
|
||||
|
||||
brush.UpdateEffects();
|
||||
//brush.UpdateEffects();
|
||||
brush.PerformFinalize();
|
||||
|
||||
foreach (KeyValuePair<BrushRenderTarget, Color> renders in brush.RenderedTargets)
|
||||
|
||||
@ -5,36 +5,36 @@
|
||||
using System;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Effects
|
||||
namespace RGB.NET.Decorators.Brush
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an effect which allows to flash an brush by modifying his opacity.
|
||||
/// Represents a decorator which allows to flash a brush by modifying his opacity.
|
||||
/// </summary>
|
||||
public class FlashEffect : AbstractBrushEffect
|
||||
public class FlashDecorator : AbstractUpdateAwareDecorator, IBrushDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the attack-time (in seconds) of the effect. (default: 0.2)<br />
|
||||
/// Gets or sets the attack-time (in seconds) of the decorator. (default: 0.2)<br />
|
||||
/// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
|
||||
/// </summary>
|
||||
public double Attack { get; set; } = 0.2;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the decay-time (in seconds) of the effect. (default: 0)<br />
|
||||
/// Gets or sets the decay-time (in seconds) of the decorator. (default: 0)<br />
|
||||
/// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
|
||||
/// </summary>
|
||||
public double Decay { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the sustain-time (in seconds) of the effect. (default: 0.3)<br />
|
||||
/// Gets or sets the sustain-time (in seconds) of the decorator. (default: 0.3)<br />
|
||||
/// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)<br />
|
||||
/// Note that this value for naming reasons represents the time NOT the level.
|
||||
/// </summary>
|
||||
public double Sustain { get; set; } = 0.3;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the release-time (in seconds) of the effect. (default: 0.2)<br />
|
||||
/// Gets or sets the release-time (in seconds) of the decorator. (default: 0.2)<br />
|
||||
/// This is close to a synthesizer envelope. (See <see href="http://en.wikipedia.org/wiki/Synthesizer#ADSR_envelope" /> as reference)
|
||||
/// </summary>
|
||||
public double Release { get; set; } = 0.2;
|
||||
@ -50,12 +50,12 @@ namespace RGB.NET.Effects
|
||||
public double SustainValue { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the interval (in seconds) in which the effect should repeat (if repetition is enabled). (default: 1)
|
||||
/// Gets or sets the interval (in seconds) in which the decorator should repeat (if repetition is enabled). (default: 1)
|
||||
/// </summary>
|
||||
public double Interval { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the amount of repetitions the effect should do until it's finished. Zero means infinite. (default: 0)
|
||||
/// Gets or sets the amount of repetitions the decorator should do until it's finished. Zero means infinite. (default: 0)
|
||||
/// </summary>
|
||||
public int Repetitions { get; set; } = 0;
|
||||
|
||||
@ -63,12 +63,17 @@ namespace RGB.NET.Effects
|
||||
private double _currentPhaseValue;
|
||||
private int _repetitionCount;
|
||||
|
||||
private double _currentValue;
|
||||
|
||||
#endregion
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(double deltaTime)
|
||||
public void ManipulateColor(Rectangle rectangle, BrushRenderTarget renderTarget, ref Color color) => color.APercent = _currentValue;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Update(double deltaTime)
|
||||
{
|
||||
_currentPhaseValue -= deltaTime;
|
||||
|
||||
@ -77,7 +82,7 @@ namespace RGB.NET.Effects
|
||||
|
||||
if (_currentPhase == ADSRPhase.Attack)
|
||||
if (_currentPhaseValue > 0)
|
||||
Brush.Opacity = Math.Min(1, (Attack - _currentPhaseValue) / Attack) * AttackValue;
|
||||
_currentValue = Math.Min(1, (Attack - _currentPhaseValue) / Attack) * AttackValue;
|
||||
else
|
||||
{
|
||||
_currentPhaseValue = Decay;
|
||||
@ -86,7 +91,7 @@ namespace RGB.NET.Effects
|
||||
|
||||
if (_currentPhase == ADSRPhase.Decay)
|
||||
if (_currentPhaseValue > 0)
|
||||
Brush.Opacity = SustainValue + (Math.Min(1, _currentPhaseValue / Decay) * (AttackValue - SustainValue));
|
||||
_currentValue = SustainValue + (Math.Min(1, _currentPhaseValue / Decay) * (AttackValue - SustainValue));
|
||||
else
|
||||
{
|
||||
_currentPhaseValue = Sustain;
|
||||
@ -95,7 +100,7 @@ namespace RGB.NET.Effects
|
||||
|
||||
if (_currentPhase == ADSRPhase.Sustain)
|
||||
if (_currentPhaseValue > 0)
|
||||
Brush.Opacity = SustainValue;
|
||||
_currentValue = SustainValue;
|
||||
else
|
||||
{
|
||||
_currentPhaseValue = Release;
|
||||
@ -104,7 +109,7 @@ namespace RGB.NET.Effects
|
||||
|
||||
if (_currentPhase == ADSRPhase.Release)
|
||||
if (_currentPhaseValue > 0)
|
||||
Brush.Opacity = Math.Min(1, _currentPhaseValue / Release) * SustainValue;
|
||||
_currentValue = Math.Min(1, _currentPhaseValue / Release) * SustainValue;
|
||||
else
|
||||
{
|
||||
_currentPhaseValue = Interval;
|
||||
@ -113,11 +118,11 @@ namespace RGB.NET.Effects
|
||||
|
||||
if (_currentPhase == ADSRPhase.Pause)
|
||||
if (_currentPhaseValue > 0)
|
||||
Brush.Opacity = 0;
|
||||
_currentValue = 0;
|
||||
else
|
||||
{
|
||||
if ((++_repetitionCount >= Repetitions) && (Repetitions > 0))
|
||||
IsDone = true;
|
||||
Detach<IBrush, FlashDecorator>();
|
||||
_currentPhaseValue = Attack;
|
||||
_currentPhase = ADSRPhase.Attack;
|
||||
}
|
||||
@ -125,17 +130,15 @@ namespace RGB.NET.Effects
|
||||
// ReSharper restore InvertIf
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Resets the effect.
|
||||
/// </summary>
|
||||
public override void OnAttach(IBrush brush)
|
||||
/// <inheritdoc />
|
||||
public override void OnAttached(IDecoratable decoratable)
|
||||
{
|
||||
base.OnAttach(brush);
|
||||
base.OnAttached(decoratable);
|
||||
|
||||
_currentPhase = ADSRPhase.Attack;
|
||||
_currentPhaseValue = Attack;
|
||||
_repetitionCount = 0;
|
||||
brush.Opacity = 0;
|
||||
_currentValue = 0;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -2,26 +2,26 @@
|
||||
using RGB.NET.Brushes.Gradients;
|
||||
using RGB.NET.Core;
|
||||
|
||||
namespace RGB.NET.Effects
|
||||
namespace RGB.NET.Decorators.Gradient
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents an effect which allows to move an <see cref="IGradient"/> by modifying his offset.
|
||||
/// Represents a decorator which allows to move an <see cref="IGradient"/> by modifying his offset.
|
||||
/// </summary>
|
||||
public class MoveGradientEffect : AbstractBrushEffect<IGradientBrush>
|
||||
public class MoveGradientDecorator : AbstractUpdateAwareDecorator, IGradientDecorator
|
||||
{
|
||||
#region Properties & Fields
|
||||
// ReSharper disable AutoPropertyCanBeMadeGetOnly.Global
|
||||
// ReSharper disable MemberCanBePrivate.Global
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the direction the <see cref="IGradient"/> is moved.
|
||||
/// Gets or sets the direction the <see cref="IGradient"/> is moved.
|
||||
/// True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left).
|
||||
/// </summary>
|
||||
public bool Direction { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the speed of the movement in units per second.
|
||||
/// The meaning of units differs for the different <see cref="IGradient"/> , but 360 units will always be one complete cycle:
|
||||
/// The meaning of units differs for the different <see cref="IGradient"/>, but 360 units will always be one complete cycle:
|
||||
/// <see cref="LinearGradient"/>: 360 unit = 1 offset.
|
||||
/// <see cref="RainbowGradient"/>: 1 unit = 1 degree.
|
||||
/// </summary>
|
||||
@ -34,11 +34,15 @@ namespace RGB.NET.Effects
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Initializes a new instance of the <see cref="MoveGradientDecorator"/> class.
|
||||
/// </summary>
|
||||
/// <param name="speed"></param>
|
||||
/// <param name="direction"></param>
|
||||
public MoveGradientEffect(double speed = 180.0, bool direction = true)
|
||||
/// <param name="speed">The speed of the movement in units per second.
|
||||
/// The meaning of units differs for the different <see cref="IGradient"/> but 360 units will always be one complete cycle:
|
||||
/// <see cref="LinearGradient"/>: 360 unit = 1 offset.
|
||||
/// <see cref="RainbowGradient"/>: 1 unit = 1 degree.</param>
|
||||
/// <param name="direction">The direction the <see cref="IGradient"/> is moved.
|
||||
/// True leads to an offset-increment (normaly moving to the right), false to an offset-decrement (normaly moving to the left).</param>
|
||||
public MoveGradientDecorator(double speed = 180.0, bool direction = true)
|
||||
{
|
||||
this.Speed = speed;
|
||||
this.Direction = direction;
|
||||
@ -49,14 +53,16 @@ namespace RGB.NET.Effects
|
||||
#region Methods
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Update(double deltaTime)
|
||||
protected override void Update(double deltaTime)
|
||||
{
|
||||
double movement = Speed * deltaTime;
|
||||
|
||||
if (!Direction)
|
||||
movement = -movement;
|
||||
|
||||
Brush?.Gradient?.Move(movement);
|
||||
foreach (IDecoratable decoratedObject in DecoratedObjects)
|
||||
if (decoratedObject is IGradient gradient)
|
||||
gradient.Move(movement);
|
||||
}
|
||||
|
||||
#endregion
|
||||
@ -1,34 +1,35 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("RGB.NET.Effects")]
|
||||
[assembly: AssemblyDescription("Effect-Presets of RGB.NET")]
|
||||
[assembly: AssemblyTitle("RGB.NET.Decorators")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Wyrez")]
|
||||
[assembly: AssemblyProduct("RGB.NET.Effects")]
|
||||
[assembly: AssemblyCopyright("Copyright © Wyrez 2017")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("RGB.NET.Decorators")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2017")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("e850caf8-3e55-40c1-b0be-30174391e55e")]
|
||||
[assembly: Guid("7012c431-244a-453f-b7fd-59e030cdbc44")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
@ -1,14 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{E850CAF8-3E55-40C1-B0BE-30174391E55E}</ProjectGuid>
|
||||
<ProjectGuid>{7012C431-244A-453F-B7FD-59E030CDBC44}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>RGB.NET.Effects</RootNamespace>
|
||||
<AssemblyName>RGB.NET.Effects</AssemblyName>
|
||||
<RootNamespace>RGB.NET.Decorators</RootNamespace>
|
||||
<AssemblyName>RGB.NET.Decorators</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
@ -20,7 +20,7 @@
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\bin\RGB.NET.Effects.XML</DocumentationFile>
|
||||
<DocumentationFile>..\bin\RGB.NET.Decorators.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
@ -29,7 +29,7 @@
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<DocumentationFile>..\bin\RGB.NET.Effects.XML</DocumentationFile>
|
||||
<DocumentationFile>..\bin\RGB.NET.Decorators.xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
@ -45,10 +45,13 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Effects\FlashEffect.cs" />
|
||||
<Compile Include="Effects\MoveGradientEffect.cs" />
|
||||
<Compile Include="Brush\FlashDecorator.cs" />
|
||||
<Compile Include="Gradient\MoveGradientDecorator.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\RGB.NET.Brushes\RGB.NET.Brushes.csproj">
|
||||
<Project>{347c5f0f-f490-4dec-9c1c-6e84750d838d}</Project>
|
||||
@ -59,15 +62,5 @@
|
||||
<Name>RGB.NET.Core</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
6
RGB.NET.Decorators/packages.config
Normal file
6
RGB.NET.Decorators/packages.config
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="RGB.NET.Brushes" version="1.0.0" targetFramework="net45" />
|
||||
<package id="RGB.NET.Core" version="1.0.0" targetFramework="net45" />
|
||||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net45" />
|
||||
</packages>
|
||||
@ -1,2 +0,0 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:Boolean x:Key="/Default/CodeInspection/NamespaceProvider/NamespaceFoldersToSkip/=effects/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="System.ValueTuple" version="4.3.1" targetFramework="net45" />
|
||||
</packages>
|
||||
@ -12,10 +12,7 @@ namespace RGB.NET.Groups
|
||||
public class ListLedGroup : AbstractLedGroup
|
||||
{
|
||||
#region Properties & Fields
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override ILedGroup EffectTarget => this;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list containing the <see cref="Led"/> of this <see cref="ListLedGroup"/>.
|
||||
/// </summary>
|
||||
|
||||
25
RGB.NET.sln
25
RGB.NET.sln
@ -1,14 +1,12 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 15
|
||||
VisualStudioVersion = 15.0.26430.15
|
||||
VisualStudioVersion = 15.0.26730.12
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Core", "RGB.NET.Core\RGB.NET.Core.csproj", "{5A4F9A75-75FE-47CD-90E5-914D5B20D232}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Brushes", "RGB.NET.Brushes\RGB.NET.Brushes.csproj", "{347C5F0F-F490-4DEC-9C1C-6E84750D838D}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Effects", "RGB.NET.Effects\RGB.NET.Effects.csproj", "{E850CAF8-3E55-40C1-B0BE-30174391E55E}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Devices", "Devices", "{33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Presets", "Presets", "{FFBCAF88-6646-43EC-9F24-2D719D3779C8}"
|
||||
@ -29,11 +27,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuGet", "NuGet", "{06416566
|
||||
NuGet\pack_all.bat = NuGet\pack_all.bat
|
||||
NuGet\RGB.NET.Brushes.nuspec = NuGet\RGB.NET.Brushes.nuspec
|
||||
NuGet\RGB.NET.Core.nuspec = NuGet\RGB.NET.Core.nuspec
|
||||
NuGet\RGB.NET.Decorators.nuspec = NuGet\RGB.NET.Decorators.nuspec
|
||||
NuGet\RGB.NET.Devices.CoolerMaster.nuspec = NuGet\RGB.NET.Devices.CoolerMaster.nuspec
|
||||
NuGet\RGB.NET.Devices.Corsair.nuspec = NuGet\RGB.NET.Devices.Corsair.nuspec
|
||||
NuGet\RGB.NET.Devices.Logitech.nuspec = NuGet\RGB.NET.Devices.Logitech.nuspec
|
||||
NuGet\RGB.NET.Devices.Novation.nuspec = NuGet\RGB.NET.Devices.Novation.nuspec
|
||||
NuGet\RGB.NET.Effects.nuspec = NuGet\RGB.NET.Effects.nuspec
|
||||
NuGet\RGB.NET.Groups.nuspec = NuGet\RGB.NET.Groups.nuspec
|
||||
NuGet\RGB.NET.Input.Corsair.nuspec = NuGet\RGB.NET.Input.Corsair.nuspec
|
||||
NuGet\RGB.NET.Input.nuspec = NuGet\RGB.NET.Input.nuspec
|
||||
@ -50,6 +48,12 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.CoolerMaste
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Devices.Novation", "RGB.NET.Devices.Novation\RGB.NET.Devices.Novation.csproj", "{DB2911F6-404C-4BC8-B35F-232A7450755F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RGB.NET.Decorators", "RGB.NET.Decorators\RGB.NET.Decorators.csproj", "{7012C431-244A-453F-B7FD-59E030CDBC44}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{347C5F0F-F490-4DEC-9C1C-6E84750D838D} = {347C5F0F-F490-4DEC-9C1C-6E84750D838D}
|
||||
{5A4F9A75-75FE-47CD-90E5-914D5B20D232} = {5A4F9A75-75FE-47CD-90E5-914D5B20D232}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -64,10 +68,6 @@ Global
|
||||
{347C5F0F-F490-4DEC-9C1C-6E84750D838D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{347C5F0F-F490-4DEC-9C1C-6E84750D838D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{347C5F0F-F490-4DEC-9C1C-6E84750D838D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E850CAF8-3E55-40C1-B0BE-30174391E55E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E850CAF8-3E55-40C1-B0BE-30174391E55E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E850CAF8-3E55-40C1-B0BE-30174391E55E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E850CAF8-3E55-40C1-B0BE-30174391E55E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DDA8C4C2-8ABF-4FA0-9AF9-C47AD0BFE47D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DDA8C4C2-8ABF-4FA0-9AF9-C47AD0BFE47D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DDA8C4C2-8ABF-4FA0-9AF9-C47AD0BFE47D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@ -100,13 +100,16 @@ Global
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7012C431-244A-453F-B7FD-59E030CDBC44}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7012C431-244A-453F-B7FD-59E030CDBC44}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7012C431-244A-453F-B7FD-59E030CDBC44}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7012C431-244A-453F-B7FD-59E030CDBC44}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{347C5F0F-F490-4DEC-9C1C-6E84750D838D} = {FFBCAF88-6646-43EC-9F24-2D719D3779C8}
|
||||
{E850CAF8-3E55-40C1-B0BE-30174391E55E} = {FFBCAF88-6646-43EC-9F24-2D719D3779C8}
|
||||
{DDA8C4C2-8ABF-4FA0-9AF9-C47AD0BFE47D} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{C854766D-9C1D-474B-B5B8-249DF4A9E552} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{F905C418-76BB-4BA6-88AB-0793BC2681D3} = {C854766D-9C1D-474B-B5B8-249DF4A9E552}
|
||||
@ -115,5 +118,9 @@ Global
|
||||
{E7B2F174-FCC6-4FC7-9970-3138B5F4C921} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{85609427-D433-44E2-A249-CE890B66D845} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{DB2911F6-404C-4BC8-B35F-232A7450755F} = {33D5E279-1C4E-4AB6-9D1E-6D18109A6C25}
|
||||
{7012C431-244A-453F-B7FD-59E030CDBC44} = {FFBCAF88-6646-43EC-9F24-2D719D3779C8}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {CDECA6C7-8D18-4AF3-94F7-C70A69B8571B}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user