From 1b9f16ea744874eea21a2e9fc0ef3a590cc492f1 Mon Sep 17 00:00:00 2001 From: Andrew Welker Date: Fri, 2 Sep 2022 14:44:15 -0600 Subject: [PATCH] fix: add missing event registration --- .../UI/TouchpanelBase.cs | 29 +++++++------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs b/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs index 806431ec..fbb7cd32 100644 --- a/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs +++ b/essentials-framework/Essentials Core/PepperDashEssentialsBase/UI/TouchpanelBase.cs @@ -17,21 +17,6 @@ namespace PepperDash.Essentials.Core.UI protected CrestronTouchpanelPropertiesConfig _config; public BasicTriListWithSmartObject Panel { get; private set; } - /// - /// Constructor for pre-created Panel. This constructor attempts to load the SGD file from the provided SGD path and subscribes to the - /// `SigChange` event for the provided panel. - /// - /// Essentials Device Key - /// Essentials Device Name - /// Provided TSW Panel - /// Path to SGD file - protected TouchpanelBase(string key, string name, Tswx52ButtonVoiceControl tsw, string sgdPath) - :base(key, name) - { - - } - - /// /// Constructor for use with device Factory. A touch panel device will be created based on the provided IP-ID and the /// type of the panel. The SGD File path can be specified using the config property, or a default one located in the program directory if none @@ -45,7 +30,9 @@ namespace PepperDash.Essentials.Core.UI protected TouchpanelBase(string key, string name, BasicTriListWithSmartObject panel, CrestronTouchpanelPropertiesConfig config) :base(key, name) { - Panel = panel; + Panel = panel; + + Panel.SigChange += Panel_SigChange; if (Panel is TswFt5ButtonSystem) { @@ -116,6 +103,14 @@ namespace PepperDash.Essentials.Core.UI protected abstract void SetupPanelDrivers(string roomKey); + /// + /// Event handler for System Extender Events + /// + /// + /// + protected abstract void ExtenderSystemReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args); + + /// /// /// @@ -167,7 +162,5 @@ namespace PepperDash.Essentials.Core.UI if(uo is Action) (uo as Action)(args.Button.State == eButtonState.Pressed); } - - protected abstract void ExtenderSystemReservedSigs_DeviceExtenderSigChange(DeviceExtender currentDeviceExtender, SigEventArgs args); } } \ No newline at end of file