mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-17 13:45:01 +00:00
feature: adds DmInputChange event
This commit is contained in:
@@ -38,6 +38,7 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
public BoolFeedback AutoRouteFeedback { get; private set; }
|
public BoolFeedback AutoRouteFeedback { get; private set; }
|
||||||
|
|
||||||
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
public event EventHandler<RoutingNumericEventArgs> NumericSwitchChange;
|
||||||
|
public event EventHandler<DMInputEventArgs> DmInputChange;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
@@ -425,6 +426,8 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
OnDmInputChange(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -457,16 +460,20 @@ namespace PepperDash_Essentials_DM.Chassis
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
// Raise an event when the status of a switch object changes.
|
||||||
/// Raise an event when the status of a switch object changes.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="args">Argumetns defined as IKeyName sender, output, input, & eRoutingSignalType</param>
|
|
||||||
private void OnSwitchChange(RoutingNumericEventArgs args)
|
private void OnSwitchChange(RoutingNumericEventArgs args)
|
||||||
{
|
{
|
||||||
var newEvent = NumericSwitchChange;
|
var newEvent = NumericSwitchChange;
|
||||||
if (newEvent != null) newEvent(this, args);
|
if (newEvent != null) newEvent(this, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Raise an event when the DM input changes.
|
||||||
|
private void OnDmInputChange(DMInputEventArgs args)
|
||||||
|
{
|
||||||
|
var newEvent = DmInputChange;
|
||||||
|
if (newEvent != null) newEvent(this, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user