|
|
|
@ -4,23 +4,30 @@ |
|
|
|
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System; |
|
|
|
using Lib.Audio.Controls.Interfaces; |
|
|
|
using Lib.Audio.Controls.Interfaces; |
|
|
|
|
|
|
|
using Lib.Driver.Xml; |
|
|
|
|
|
|
|
|
|
|
|
namespace Lib.Audio.Controls |
|
|
|
namespace Lib.Audio.Controls |
|
|
|
{ |
|
|
|
{ |
|
|
|
public class Fader : IFader |
|
|
|
public class Fader : IFader |
|
|
|
{ |
|
|
|
{ |
|
|
|
private float _position; |
|
|
|
private int _position; |
|
|
|
|
|
|
|
|
|
|
|
public float Position |
|
|
|
public Fader(XmlFader xmlFader) => NoteNumber = xmlFader.NoteNumber; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int NoteNumber { get; } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int Position |
|
|
|
{ |
|
|
|
{ |
|
|
|
get => _position; |
|
|
|
get => _position; |
|
|
|
private set |
|
|
|
set |
|
|
|
{ |
|
|
|
{ |
|
|
|
_position = value; |
|
|
|
_position = value; |
|
|
|
PositionChanged?.Invoke(this, _position); |
|
|
|
PositionChanged?.Invoke(this, _position); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public bool IsTouched { get; set; } |
|
|
|
|
|
|
|
|
|
|
|
public event EventHandler<float>? PositionChanged; |
|
|
|
public event EventHandler<float>? PositionChanged; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |