mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-04-12 12:06:58 +00:00
feat: Update Essentials Device to call Initialize method
This commit is contained in:
parent
66ecf43508
commit
10445508b2
1 changed files with 21 additions and 0 deletions
|
|
@ -27,6 +27,27 @@ namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SubscribeToActivateComplete()
|
||||||
|
{
|
||||||
|
DeviceManager.AllDevicesActivated += DeviceManagerOnAllDevicesActivated;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DeviceManagerOnAllDevicesActivated(object sender, EventArgs eventArgs)
|
||||||
|
{
|
||||||
|
CrestronInvoke.BeginInvoke((o) =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Initialize();
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Debug.Console(0, this, Debug.ErrorLogLevel.Error, "Exception initializing device: {0}", ex.Message);
|
||||||
|
Debug.Console(1, this, Debug.ErrorLogLevel.Error, "Stack Trace: {0}", ex.StackTrace);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
|
[AttributeUsage(AttributeTargets.Class, Inherited = true, AllowMultiple = true)]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue