diff --git a/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs b/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
index 57a8db23..c19e2da7 100644
--- a/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Shades/Shade Interfaces.cs
@@ -4,6 +4,8 @@ using System.Linq;
using System.Text;
using Crestron.SimplSharp;
+using PepperDash.Core;
+
namespace PepperDash.Essentials.Core.Shades
{
public interface IShades
@@ -12,12 +14,29 @@ namespace PepperDash.Essentials.Core.Shades
}
///
- /// Requirements for a device that implements basic shade control
+ /// Requirements for a device that implements basic Open/Close shade control
///
- public interface iShadesRaiseLower
+ public interface IShadesOpenClose
{
void Open();
- void Stop();
void Close();
}
+
+ ///
+ /// Requirements for a device that implements basic Open/Close/Stop shade control
+ ///
+ public interface IShadesOpenCloseStop : IShadesOpenClose
+ {
+ void Stop();
+ }
+
+ ///
+ /// Requirements for a shade device that provides open/closed feedback
+ ///
+ public interface iShadesRaiseLowerFeedback
+ {
+ BoolFeedback ShadeIsOpenFeedback { get; }
+ BoolFeedback ShadeIsClosedFeedback { get; }
+ }
+
}
\ No newline at end of file
diff --git a/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs b/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
index 3f3e23bb..2021a381 100644
--- a/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
+++ b/Essentials Core/PepperDashEssentialsBase/Shades/ShadeBase.cs
@@ -9,20 +9,20 @@ using PepperDash.Essentials.Core.CrestronIO;
namespace PepperDash.Essentials.Core.Shades
{
- public abstract class ShadeBase : Device, iShadesRaiseLower
+ ///
+ /// Base class for a shade device
+ ///
+ public abstract class ShadeBase : Device, IShadesOpenClose
{
- public ISwitchedOutput SwitchedOutput;
-
public ShadeBase(string key, string name)
: base(key, name)
{
}
- #region iShadesRaiseLower Members
+ #region iShadesOpenClose Members
public abstract void Open();
- public abstract void Stop();
public abstract void Close();
#endregion
diff --git a/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs b/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
index 42ca8b42..ec5e5773 100644
--- a/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
+++ b/Essentials Devices Common/Essentials Devices Common/Environment/Somfy/RelayControlledShade.cs
@@ -14,7 +14,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
///
/// Controls a single shade using three relays
///
- public class RelayControlledShade : ShadeBase
+ public class RelayControlledShade : ShadeBase, IShadesOpenCloseStop
{
RelayControlledShadeConfigProperties Config;
@@ -52,7 +52,7 @@ namespace PepperDash.Essentials.Devices.Common.Environment.Somfy
OpenRelay.On();
}
- public override void Stop()
+ public void Stop()
{
OpenRelay.Off();
CloseRelay.Off();
diff --git a/Essentials/PepperDashEssentials/Factory/UiDeviceFactory.cs b/Essentials/PepperDashEssentials/Factory/UiDeviceFactory.cs
index fad2ce93..5b96ba24 100644
--- a/Essentials/PepperDashEssentials/Factory/UiDeviceFactory.cs
+++ b/Essentials/PepperDashEssentials/Factory/UiDeviceFactory.cs
@@ -53,6 +53,8 @@ namespace PepperDash.Essentials
{
Debug.Console(0, panelController, "Adding environment driver");
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
+
+ mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.Config.Environment);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
@@ -65,6 +67,15 @@ namespace PepperDash.Essentials
// Wire up hard keys
tsw.Power.UserObject = new Action(b => { if (!b) avDriver.PowerButtonPressed(); });
//tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); });
+ if(mainDriver.EnvironmentDriver != null)
+ tsw.Lights.UserObject = new Action(b =>
+ {
+ if (!b)
+ {
+ mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
+ mainDriver.EnvironmentDriver.Toggle();
+ }
+ });
tsw.Up.UserObject = new Action(avDriver.VolumeUpPress);
tsw.Down.UserObject = new Action(avDriver.VolumeDownPress);
}
@@ -111,6 +122,8 @@ namespace PepperDash.Essentials
{
Debug.Console(0, panelController, "Adding environment driver");
mainDriver.EnvironmentDriver = new EssentialsEnvironmentDriver(mainDriver, props);
+
+ mainDriver.EnvironmentDriver.GetDevicesFromConfig(avDriver.CurrentRoom.Config.Environment);
}
mainDriver.HeaderDriver.SetupHeaderButtons(avDriver, avDriver.CurrentRoom);
@@ -123,6 +136,15 @@ namespace PepperDash.Essentials
// Wire up hard keys
tsw.Power.UserObject = new Action(b => { if (!b) avDriver.EndMeetingPress(); });
//tsw.Home.UserObject = new Action(b => { if (!b) HomePressed(); });
+ if (mainDriver.EnvironmentDriver != null)
+ tsw.Lights.UserObject = new Action(b =>
+ {
+ if (!b)
+ {
+ mainDriver.AvDriver.PopupInterlock.ShowInterlockedWithToggle(mainDriver.EnvironmentDriver.BackgroundSubpageJoin);
+ mainDriver.EnvironmentDriver.Toggle();
+ }
+ });
tsw.Up.UserObject = new Action(avDriver.VolumeUpPress);
tsw.Down.UserObject = new Action(avDriver.VolumeDownPress);
}
diff --git a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
index de8e6b15..4e277117 100644
--- a/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
+++ b/Essentials/PepperDashEssentials/PepperDashEssentials.csproj
@@ -169,7 +169,8 @@
-
+
+
diff --git a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs
index 4fa1aa8d..848e4f30 100644
--- a/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs
+++ b/Essentials/PepperDashEssentials/Properties/AssemblyInfo.cs
@@ -4,5 +4,5 @@
[assembly: AssemblyCompany("PepperDash Technology Corp")]
[assembly: AssemblyProduct("PepperDashEssentials")]
[assembly: AssemblyCopyright("Copyright © PepperDash Technology Corp 2017")]
-[assembly: AssemblyVersion("1.1.0.*")]
+[assembly: AssemblyVersion("1.2.0.*")]
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
index ad1a000b..f84bdef6 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIBoolJoin.cs
@@ -223,12 +223,92 @@ namespace PepperDash.Essentials
///
/// 1256
///
- public const uint VCMinMaxEnable = 1256;
+ public const uint VCMinMaxEnable = 1256;
+ // Letter joins start at 2921;
//******************************************************
- // Letter joins start at 2921;
+ // Environment Joins
+
+ // Popup Container
+
+ ///
+ /// 3001 - 3004
+ ///
+ public const uint EnvironmentPopupSubpageVisibleBase = 3000;
+
+
+ // ColumnOne
+
+ ///
+ /// 3011 - 3015
+ ///
+ public const uint EnvironmentColumnOneLightingTypeVisibleBase = 3010;
+
+ ///
+ /// 3016 - 3020
+ ///
+ public const uint EnvironmentColumnOneShadingTypeVisibleBase = 3015;
+
+ // ColumnTwo
+
+ ///
+ /// 3021 - 3025
+ ///
+ public const uint EnvironmentColumnTwoLightingTypeVisibleBase = 3020;
+
+ ///
+ /// 3026 - 3030
+ ///
+ public const uint EnvironmentColumnTwoShadingTypeVisibleBase = 3025;
+
+ // ColumnThree
+
+ ///
+ /// 3031 - 3035
+ ///
+ public const uint EnvironmentColumnThreeLightingTypeVisibleBase = 3030;
+
+ ///
+ /// 3036 - 3040
+ ///
+ public const uint EnvironmentColumnThreeShadingTypeVisibleBase = 3035;
+
+ // ColumnFour
+
+ ///
+ /// 3041 - 3045
+ ///
+ public const uint EnvironmentColumnFourLightingTypeVisibleBase = 3040;
+
+ ///
+ /// 3046 - 3050
+ ///
+ public const uint EnvironmentColumnFourShadingTypeVisibleBase = 3045;
+
+ ///
+ /// 3051 - 3060
+ ///
+ public const uint EnvironmentColumnOneButtonPressBase = 3050;
+
+ ///
+ /// 3061 - 3070
+ ///
+ public const uint EnvironmentColumnTwoButtonPressBase = 3060;
+
+ ///
+ /// 3071 - 3080
+ ///
+ public const uint EnvironmentColumnThreeButtonPressBase = 3070;
+
+ ///
+ /// 3081 - 3090
+ ///
+ public const uint EnvironmentColumnFourButtonPressBase = 3080;
+
+
+ //******************************************************
///
/// 3101
@@ -263,7 +343,7 @@ namespace PepperDash.Essentials
///
public const uint TechSchedulerVisible = 3112;
- //******************************************************
+ //*****************************************************
///
/// 3811
///
diff --git a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
index 2f4fabe4..d7ee032c 100644
--- a/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
+++ b/Essentials/PepperDashEssentials/UI/JoinConstants/UIStringlJoin.cs
@@ -68,6 +68,34 @@ namespace PepperDash.Essentials
///
//public const uint KeypadText = 2901;
+ //******************************************************
+
+ // Environment Joins
+
+ ///
+ /// 3001 - 3010
+ ///
+ public const uint EnvironmentColumnOneLabelBase = 3000;
+
+ ///
+ /// 3011 - 3020
+ ///
+ public const uint EnvironmentColumnTwoLabelBase = 3010;
+
+ ///
+ /// 3021 - 3030
+ ///
+ public const uint EnvironmentColumnThreeLabelBase = 3020;
+
+ ///
+ /// 3031 - 3040
+ ///
+ public const uint EnvironmentColumnFourLabelBase = 3030;
+
+ // 3050, 3060, 3070 and 3080 reserved for column device name labels
+
+ //******************************************************
+
///
/// 3101 - This is the start of the range 3101 - 3120
///
diff --git a/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs
new file mode 100644
index 00000000..8fa74712
--- /dev/null
+++ b/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsEnvironmentDriver.cs
@@ -0,0 +1,213 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Config;
+using PepperDash.Essentials.Core.Shades;
+using PepperDash.Essentials.Core.Lighting;
+
+namespace PepperDash.Essentials
+{
+ public class EssentialsEnvironmentDriver : PanelDriverBase
+ {
+ ///
+ /// Do I need this here?
+ ///
+ CrestronTouchpanelPropertiesConfig Config;
+
+ ///
+ /// The list of devices this driver is responsible for controlling
+ ///
+ public List Devices { get; private set; }
+
+ ///
+ /// The parent driver for this
+ ///
+ EssentialsPanelMainInterfaceDriver Parent;
+
+ ///
+ /// The list of sub drivers for the devices
+ ///
+ public List DeviceSubDrivers { get; private set; }
+
+ public uint BackgroundSubpageJoin { get; private set; }
+
+ public EssentialsEnvironmentDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
+ : base(parent.TriList)
+ {
+ Config = config;
+ Parent = parent;
+
+ Devices = new List();
+ DeviceSubDrivers = new List();
+
+ // Calculate the join offests for each device page and assign join actions for each button
+ }
+
+ ///
+ /// Shows this driver and all sub drivers
+ ///
+ public override void Show()
+ {
+ //TriList.SetBool(BackgroundSubpageJoin, true);
+
+ foreach (var driver in DeviceSubDrivers)
+ {
+ driver.Show();
+ }
+
+ base.Show();
+ }
+
+ ///
+ /// Hides this driver and all sub drivers
+ ///
+ public override void Hide()
+ {
+ //TriList.SetBool(BackgroundSubpageJoin, false);
+
+ foreach (var driver in DeviceSubDrivers)
+ {
+ driver.Hide();
+ }
+
+ base.Hide();
+ }
+
+ public override void Toggle()
+ {
+ base.Toggle();
+ }
+
+
+ ///
+ /// Reads the device keys from the config and gets the devices by key
+ ///
+ public void GetDevicesFromConfig(Room.Config.EssentialsEnvironmentPropertiesConfig EnvironmentPropertiesConfig)
+ {
+ if (EnvironmentPropertiesConfig != null)
+ {
+ Devices.Clear();
+ DeviceSubDrivers.Clear();
+
+ uint column = 4;
+
+ foreach (var dKey in EnvironmentPropertiesConfig.DeviceKeys)
+ {
+ var device = DeviceManager.GetDeviceForKey(dKey);
+
+ if (device != null)
+ {
+ Devices.Add(device);
+
+ // Add new PanelDriverBase SubDriver
+ DeviceSubDrivers.Add(GetPanelDriverForDevice(device, column));
+
+ Debug.Console(1, "Adding '{0}' to Environment Devices", device.Key);
+ }
+
+ column --;
+ }
+
+ SetupEnvironmentUiJoins();
+ }
+ else
+ {
+ Debug.Console(1, "Unable to get devices from config. No EnvironmentPropertiesConfig object in room config");
+ }
+ }
+
+ ///
+ /// Returns the appropriate panel driver for the device
+ ///
+ ///
+ ///
+ ///
+ PanelDriverBase GetPanelDriverForDevice(IKeyed device, uint column)
+ {
+ PanelDriverBase panelDriver = null;
+
+ uint digitalJoinBase = 0;
+ uint stringJoinBase = 0;
+ uint shadeTypeVisibleBase = 0;
+ uint lightingTypeVisibleBase = 0;
+
+ switch (column)
+ {
+ case 4:
+ {
+ digitalJoinBase = UIBoolJoin.EnvironmentColumnFourButtonPressBase;
+ stringJoinBase = UIStringJoin.EnvironmentColumnFourLabelBase;
+ shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourShadingTypeVisibleBase;
+ lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnFourLightingTypeVisibleBase;
+ break;
+ }
+ case 3:
+ {
+ digitalJoinBase = UIBoolJoin.EnvironmentColumnThreeButtonPressBase;
+ stringJoinBase = UIStringJoin.EnvironmentColumnThreeLabelBase;
+ shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeShadingTypeVisibleBase;
+ lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnThreeLightingTypeVisibleBase;
+ break;
+ }
+ case 2:
+ {
+ digitalJoinBase = UIBoolJoin.EnvironmentColumnTwoButtonPressBase;
+ stringJoinBase = UIStringJoin.EnvironmentColumnTwoLabelBase;
+ shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoShadingTypeVisibleBase;
+ lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnTwoLightingTypeVisibleBase;
+ break;
+ }
+ case 1:
+ {
+ digitalJoinBase = UIBoolJoin.EnvironmentColumnOneButtonPressBase;
+ stringJoinBase = UIStringJoin.EnvironmentColumnOneLabelBase;
+ shadeTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneShadingTypeVisibleBase;
+ lightingTypeVisibleBase = UIBoolJoin.EnvironmentColumnOneLightingTypeVisibleBase;
+ break;
+ }
+ default:
+ {
+ Debug.Console(1, "Environment Driver: Invalid column number specified");
+ break;
+ }
+ }
+
+ // Determine if device is a shade or lighting type and construct the appropriate driver
+ if (device is ShadeBase)
+ {
+ panelDriver = new EssentialsShadeDriver(this, device.Key, digitalJoinBase, stringJoinBase, shadeTypeVisibleBase);
+ }
+ else if (device is LightingBase)
+ {
+ //panelDriver = new EssentialsLightingDriver(this, device.Key, digitalJoinBase, stringJoinBase, lightingTypeVisibleBase);
+ }
+
+ // Return the driver
+
+ return panelDriver;
+ }
+
+ ///
+ /// Determines the join values for the generic environment subpages
+ ///
+ void SetupEnvironmentUiJoins()
+ {
+ // Calculate which background subpage join to use
+ BackgroundSubpageJoin = UIBoolJoin.EnvironmentPopupSubpageVisibleBase + (uint)DeviceSubDrivers.Count;
+
+
+ }
+
+ }
+
+ public interface IEnvironmentSubdriver
+ {
+ uint SubpageVisibleJoin { get; }
+ }
+
+}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs
new file mode 100644
index 00000000..9e8ad894
--- /dev/null
+++ b/Essentials/PepperDashEssentials/UIDrivers/Environment Drivers/EssentialsShadeDriver.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using Crestron.SimplSharp;
+
+using PepperDash.Core;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.Config;
+using PepperDash.Essentials.Core.Shades;
+
+namespace PepperDash.Essentials
+{
+ public class EssentialsShadeDriver : PanelDriverBase, IEnvironmentSubdriver
+ {
+ EssentialsEnvironmentDriver Parent;
+
+ public ShadeBase ShadeDevice { get; private set; }
+
+ public uint SubpageVisibleJoin { get; private set; }
+
+ uint DigitalJoinBase;
+
+ uint StringJoinBase;
+
+ eShadeDeviceType DeviceType;
+
+ public EssentialsShadeDriver(EssentialsEnvironmentDriver parent, string deviceKey, uint digitalJoinBase, uint stringJoinBase, uint subpageVisibleBase)
+ : base(parent.TriList)
+ {
+ Parent = parent;
+
+ DigitalJoinBase = digitalJoinBase;
+ StringJoinBase = stringJoinBase;
+
+ ShadeDevice = DeviceManager.GetDeviceForKey(deviceKey) as ShadeBase;
+
+ SetDeviceType();
+
+ SetSubpageVisibleJoin(subpageVisibleBase);
+ }
+
+ public override void Show()
+ {
+ TriList.SetBool(SubpageVisibleJoin, true);
+
+ base.Show();
+ }
+
+ public override void Hide()
+ {
+ TriList.SetBool(SubpageVisibleJoin, false);
+
+ base.Hide();
+ }
+
+ void SetUpDeviceName()
+ {
+ Parent.TriList.SetString(StringJoinBase + 50, ShadeDevice.Name);
+ }
+
+ void SetDeviceType()
+ {
+ if (ShadeDevice is IShadesOpenCloseStop)
+ DeviceType = eShadeDeviceType.OpenCloseStop;
+ else if (ShadeDevice is IShadesOpenClose)
+ DeviceType = eShadeDeviceType.OpenClose;
+ }
+
+ void SetSubpageVisibleJoin(uint subpageVisibleBase)
+ {
+ SubpageVisibleJoin = subpageVisibleBase + (uint)DeviceType;
+ }
+ }
+
+ enum eShadeDeviceType : uint
+ {
+ None = 0,
+ OpenCloseStop = 1,
+ OpenClose = 2,
+ DiscreteLevel = 3
+ }
+}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsEnvironmentDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsEnvironmentDriver.cs
deleted file mode 100644
index 6096e2dc..00000000
--- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsEnvironmentDriver.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using Crestron.SimplSharp;
-
-namespace PepperDash.Essentials
-{
- public class EssentialsEnvironmentDriver : PanelDriverBase
- {
- CrestronTouchpanelPropertiesConfig Config;
-
- ///
- /// The parent driver for this
- ///
- EssentialsPanelMainInterfaceDriver Parent;
-
- public EssentialsEnvironmentDriver(EssentialsPanelMainInterfaceDriver parent, CrestronTouchpanelPropertiesConfig config)
- : base(parent.TriList)
- {
- Config = config;
- Parent = parent;
- }
-
- }
-
-
-}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
index c08a31ba..c301cc36 100644
--- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
+++ b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsHeaderDriver.cs
@@ -103,8 +103,13 @@ namespace PepperDash.Essentials
if (environmentDriver != null)
{
TriList.SetString(nextJoin, "Lights");
- TriList.SetSigFalseAction(nextJoin, environmentDriver.Show);
-
+ TriList.SetSigFalseAction(nextJoin, () =>
+ {
+ Parent.AvDriver.PopupInterlock.ShowInterlockedWithToggle(environmentDriver.BackgroundSubpageJoin);
+ environmentDriver.Toggle();
+ });
+ //TriList.SetSigFalseAction(nextJoin, environmentDriver.Toggle);
+#warning Check the best way to show the environment subpage
nextJoin--;
return nextJoin;
}
diff --git a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs
index a985913c..d843e152 100644
--- a/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs
+++ b/Essentials/PepperDashEssentials/UIDrivers/Essentials/EssentialsPanelMainInterfaceDriver.cs
@@ -1,71 +1,71 @@
-using System;
-using Crestron.SimplSharpPro.DeviceSupport;
-using Crestron.SimplSharpPro.UI;
-using PepperDash.Essentials.Core;
-using PepperDash.Essentials.Core.SmartObjects;
-
-namespace PepperDash.Essentials
-{
- ///
- ///
- ///
- public class EssentialsPanelMainInterfaceDriver : PanelDriverBase
- {
- ///
- /// Assign the appropriate A/V driver.
- /// Want to keep the AvDriver alive, because it may hold states
- ///
+using System;
+using Crestron.SimplSharpPro.DeviceSupport;
+using Crestron.SimplSharpPro.UI;
+using PepperDash.Essentials.Core;
+using PepperDash.Essentials.Core.SmartObjects;
+
+namespace PepperDash.Essentials
+{
+ ///
+ ///
+ ///
+ public class EssentialsPanelMainInterfaceDriver : PanelDriverBase
+ {
+ ///
+ /// Assign the appropriate A/V driver.
+ /// Want to keep the AvDriver alive, because it may hold states
+ ///
public IAVDriver AvDriver { get; set; }
public EssentialsHeaderDriver HeaderDriver { get; set; }
- public EssentialsEnvironmentDriver EnvironmentDriver { get; set; }
-
- public PanelDriverBase CurrentChildDriver { get; private set; }
-
+ public EssentialsEnvironmentDriver EnvironmentDriver { get; set; }
+
+ public PanelDriverBase CurrentChildDriver { get; private set; }
+
CrestronTouchpanelPropertiesConfig Config;
///
/// The main interlock for popups
///
- public JoinedSigInterlock PopupInterlock { get; private set; }
-
- public EssentialsPanelMainInterfaceDriver(BasicTriListWithSmartObject trilist,
- CrestronTouchpanelPropertiesConfig config)
- : base(trilist)
- {
- Config = config;
- }
-
- public override void Show()
- {
- CurrentChildDriver = null;
- ShowSubDriver(AvDriver as PanelDriverBase);
- base.Show();
- }
-
- public override void Hide()
- {
- TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
- base.Hide();
- }
-
- void ShowSubDriver(PanelDriverBase driver)
- {
- CurrentChildDriver = driver;
- if (driver == null)
- return;
- this.Hide();
- driver.Show();
- }
-
- ///
- ///
- ///
- public override void BackButtonPressed()
- {
- if(CurrentChildDriver != null)
- CurrentChildDriver.BackButtonPressed();
- }
- }
+ //public JoinedSigInterlock PopupInterlock { get; private set; }
+
+ public EssentialsPanelMainInterfaceDriver(BasicTriListWithSmartObject trilist,
+ CrestronTouchpanelPropertiesConfig config)
+ : base(trilist)
+ {
+ Config = config;
+ }
+
+ public override void Show()
+ {
+ CurrentChildDriver = null;
+ ShowSubDriver(AvDriver as PanelDriverBase);
+ base.Show();
+ }
+
+ public override void Hide()
+ {
+ TriList.BooleanInput[UIBoolJoin.StartPageVisible].BoolValue = false;
+ base.Hide();
+ }
+
+ void ShowSubDriver(PanelDriverBase driver)
+ {
+ CurrentChildDriver = driver;
+ if (driver == null)
+ return;
+ this.Hide();
+ driver.Show();
+ }
+
+ ///
+ ///
+ ///
+ public override void BackButtonPressed()
+ {
+ if(CurrentChildDriver != null)
+ CurrentChildDriver.BackButtonPressed();
+ }
+ }
}
\ No newline at end of file
diff --git a/Essentials/PepperDashEssentials/UIDrivers/enums and base.cs b/Essentials/PepperDashEssentials/UIDrivers/enums and base.cs
index 7bfa14de..dbb1a681 100644
--- a/Essentials/PepperDashEssentials/UIDrivers/enums and base.cs
+++ b/Essentials/PepperDashEssentials/UIDrivers/enums and base.cs
@@ -85,7 +85,7 @@ namespace PepperDash.Essentials
///
/// Toggles visibility of this driver
///
- public void Toggle()
+ public virtual void Toggle()
{
if (IsVisible)
Hide();
diff --git a/Release Package/PepperDashEssentials.cpz b/Release Package/PepperDashEssentials.cpz
index 7627ed8c..f20c98f9 100644
Binary files a/Release Package/PepperDashEssentials.cpz and b/Release Package/PepperDashEssentials.cpz differ
diff --git a/Release Package/PepperDashEssentials.dll b/Release Package/PepperDashEssentials.dll
index d6bd8645..fce45845 100644
Binary files a/Release Package/PepperDashEssentials.dll and b/Release Package/PepperDashEssentials.dll differ