mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 12:44:58 +00:00
fix: remove inheritance and keep separate fb in class.
This commit is contained in:
@@ -6,9 +6,10 @@ using Crestron.SimplSharp;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Feedbacks
|
namespace PepperDash.Essentials.Core.Feedbacks
|
||||||
{
|
{
|
||||||
public class BoolWithFeedback : BoolFeedback
|
public class BoolWithFeedback
|
||||||
{
|
{
|
||||||
private bool _Value;
|
private bool _Value;
|
||||||
|
public BoolFeedback Feedback;
|
||||||
public bool Value
|
public bool Value
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -18,13 +19,13 @@ namespace PepperDash.Essentials.Core.Feedbacks
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Value = value;
|
_Value = value;
|
||||||
this.FireUpdate();
|
Feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public BoolWithFeedback()
|
public BoolWithFeedback()
|
||||||
: base(() => Value)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
{
|
||||||
|
Feedback = new BoolFeedback(() => { return Value; });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +6,10 @@ using Crestron.SimplSharp;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Feedbacks
|
namespace PepperDash.Essentials.Core.Feedbacks
|
||||||
{
|
{
|
||||||
public class IntWithFeedback : IntFeedback
|
public class IntWithFeedback
|
||||||
{
|
{
|
||||||
private int _Value;
|
private int _Value;
|
||||||
|
public IntFeedback Feedback;
|
||||||
public int Value
|
public int Value
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -18,13 +19,13 @@ namespace PepperDash.Essentials.Core.Feedbacks
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Value = value;
|
_Value = value;
|
||||||
this.FireUpdate();
|
Feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public IntWithFeedback()
|
public IntWithFeedback()
|
||||||
: base(() => Value)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
{
|
||||||
|
Feedback = new IntFeedback((() => Value));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6,9 +6,10 @@ using Crestron.SimplSharp;
|
|||||||
|
|
||||||
namespace PepperDash.Essentials.Core.Feedbacks
|
namespace PepperDash.Essentials.Core.Feedbacks
|
||||||
{
|
{
|
||||||
public class StringWithFeedback : StringFeedback
|
public class StringWithFeedback
|
||||||
{
|
{
|
||||||
private string _Value;
|
private string _Value;
|
||||||
|
public StringFeedback Feedback;
|
||||||
public string Value
|
public string Value
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
@@ -18,13 +19,13 @@ namespace PepperDash.Essentials.Core.Feedbacks
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
_Value = value;
|
_Value = value;
|
||||||
this.FireUpdate();
|
Feedback.FireUpdate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public StringWithFeedback()
|
public StringWithFeedback()
|
||||||
: base(() => Value)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
{
|
||||||
|
Feedback = new StringFeedback(() => Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user