diff --git a/Lib.Audio/Controls/Fader.cs b/Lib.Audio/Controls/Fader.cs index b9ea12f..cba245a 100644 --- a/Lib.Audio/Controls/Fader.cs +++ b/Lib.Audio/Controls/Fader.cs @@ -2,12 +2,25 @@ // Created: 2021-04-07 // Copyright(c) 2021 SimonG. All Rights Reserved. +using System; using Lib.Audio.Controls.Interfaces; namespace Lib.Audio.Controls { public class Fader : IFader { - + private float _position; + + public float Position + { + get => _position; + private set + { + _position = value; + PositionChanged?.Invoke(this, _position); + } + } + + public event EventHandler PositionChanged; } } \ No newline at end of file diff --git a/Lib.Audio/Controls/Interfaces/IFader.cs b/Lib.Audio/Controls/Interfaces/IFader.cs index 1741180..475bb50 100644 --- a/Lib.Audio/Controls/Interfaces/IFader.cs +++ b/Lib.Audio/Controls/Interfaces/IFader.cs @@ -2,10 +2,14 @@ // Created: 2021-04-07 // Copyright(c) 2021 SimonG. All Rights Reserved. +using System; + namespace Lib.Audio.Controls.Interfaces { public interface IFader { - + float Position { get; } //TODO: float or double? + + event EventHandler PositionChanged; } } \ No newline at end of file