mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 21:24:54 +00:00
Moved CrestronTouchpanelPropertiesConfig down to Essentials.Core so that the DgeController can use it from Essentials.DM. Modified EssentialsTouchpanelController to be able to use a dge100 as a panel. Added UiDeviceFactory condition to build dge100/dmdge200c
This commit is contained in:
@@ -13,6 +13,7 @@ using PepperDash.Core;
|
|||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Config;
|
using PepperDash.Essentials.Core.Config;
|
||||||
using PepperDash.Essentials.Core.PageManagers;
|
using PepperDash.Essentials.Core.PageManagers;
|
||||||
|
using PepperDash.Essentials.DM.Endpoints.DGEs;
|
||||||
|
|
||||||
|
|
||||||
namespace PepperDash.Essentials
|
namespace PepperDash.Essentials
|
||||||
@@ -23,9 +24,31 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
var comm = CommFactory.GetControlPropertiesConfig(config);
|
var comm = CommFactory.GetControlPropertiesConfig(config);
|
||||||
|
|
||||||
|
var typeName = config.Type.ToLower();
|
||||||
|
|
||||||
|
EssentialsTouchpanelController panelController = null;
|
||||||
|
|
||||||
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(config.Properties.ToString());
|
var props = JsonConvert.DeserializeObject<CrestronTouchpanelPropertiesConfig>(config.Properties.ToString());
|
||||||
|
|
||||||
EssentialsTouchpanelController panelController = new EssentialsTouchpanelController(config.Key, config.Name, config.Type, props, comm.IpIdInt);
|
if (typeName.Contains("dge"))
|
||||||
|
{
|
||||||
|
Dge100 dgeDevice = null;
|
||||||
|
if (typeName == "dge100")
|
||||||
|
dgeDevice = new Dge100(comm.IpIdInt, Global.ControlSystem);
|
||||||
|
else if (typeName == "dmdge200c")
|
||||||
|
dgeDevice = new DmDge200C(comm.IpIdInt, Global.ControlSystem);
|
||||||
|
|
||||||
|
var dgeController = new DgeController(config.Key, config.Name, dgeDevice, config, props);
|
||||||
|
|
||||||
|
DeviceManager.AddDevice(dgeController);
|
||||||
|
|
||||||
|
panelController = new EssentialsTouchpanelController(config.Key, config.Name, dgeController.DigitalGraphicsEngine,
|
||||||
|
props.ProjectName, props.SgdFile);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
panelController = new EssentialsTouchpanelController(config.Key, config.Name, config.Type, props, comm.IpIdInt);
|
||||||
|
}
|
||||||
|
|
||||||
panelController.AddPostActivationAction(() =>
|
panelController.AddPostActivationAction(() =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -222,7 +222,6 @@
|
|||||||
<Compile Include="AppServer\CotijaSystemController.cs" />
|
<Compile Include="AppServer\CotijaSystemController.cs" />
|
||||||
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
<Compile Include="UI\DualDisplaySourceSRLController.cs" />
|
||||||
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
<Compile Include="UI\SubpageReferenceListActivityItem.cs" />
|
||||||
<Compile Include="UI\CrestronTouchpanelPropertiesConfig.cs" />
|
|
||||||
<Compile Include="FOR REFERENCE UI\Panels\REMOVE UiCue.cs" />
|
<Compile Include="FOR REFERENCE UI\Panels\REMOVE UiCue.cs" />
|
||||||
<Compile Include="FOR REFERENCE UI\SRL\SourceListSubpageReferenceList.cs" />
|
<Compile Include="FOR REFERENCE UI\SRL\SourceListSubpageReferenceList.cs" />
|
||||||
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
<Compile Include="Room\Types\EssentialsHuddleSpaceRoom.cs" />
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
namespace PepperDash.Essentials
|
|
||||||
{
|
|
||||||
public class CrestronTouchpanelPropertiesConfig
|
|
||||||
{
|
|
||||||
public string IpId { get; set; }
|
|
||||||
public string DefaultRoomKey { get; set; }
|
|
||||||
public string RoomListKey { get; set; }
|
|
||||||
public string SgdFile { get; set; }
|
|
||||||
public string ProjectName { get; set; }
|
|
||||||
public bool ShowVolumeGauge { get; set; }
|
|
||||||
public bool UsesSplashPage { get; set; }
|
|
||||||
public bool ShowDate { get; set; }
|
|
||||||
public bool ShowTime { get; set; }
|
|
||||||
public UiSetupPropertiesConfig Setup { get; set; }
|
|
||||||
public string HeaderStyle { get; set; }
|
|
||||||
public bool IncludeInFusionRoomHealth { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The count of sources that will trigger the "additional" arrows to show on the SRL.
|
|
||||||
/// Defaults to 5
|
|
||||||
/// </summary>
|
|
||||||
public int SourcesOverflowCount { get; set; }
|
|
||||||
|
|
||||||
public CrestronTouchpanelPropertiesConfig()
|
|
||||||
{
|
|
||||||
SourcesOverflowCount = 5;
|
|
||||||
HeaderStyle = CrestronTouchpanelPropertiesConfig.Habanero;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// "habanero"
|
|
||||||
/// </summary>
|
|
||||||
public const string Habanero = "habanero";
|
|
||||||
/// <summary>
|
|
||||||
/// "verbose"
|
|
||||||
/// </summary>
|
|
||||||
public const string Verbose = "verbose";
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public class UiSetupPropertiesConfig
|
|
||||||
{
|
|
||||||
public bool IsVisible { get; set; }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -27,9 +27,17 @@ namespace PepperDash.Essentials
|
|||||||
{
|
{
|
||||||
Panel = tsw;
|
Panel = tsw;
|
||||||
tsw.LoadSmartObjects(sgdPath);
|
tsw.LoadSmartObjects(sgdPath);
|
||||||
tsw.SigChange += new Crestron.SimplSharpPro.DeviceSupport.SigEventHandler(Tsw_SigChange);
|
tsw.SigChange += Panel_SigChange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EssentialsTouchpanelController(string key, string name, Dge100 panel, string projectName, string sgdPath)
|
||||||
|
: base(key, name)
|
||||||
|
{
|
||||||
|
Panel = panel;
|
||||||
|
panel.LoadSmartObjects(sgdPath);
|
||||||
|
panel.SigChange += Panel_SigChange;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Config constructor
|
/// Config constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -65,11 +73,6 @@ namespace PepperDash.Essentials
|
|||||||
Panel = new Tsw1052(id, Global.ControlSystem);
|
Panel = new Tsw1052(id, Global.ControlSystem);
|
||||||
else if (type == "tsw1060")
|
else if (type == "tsw1060")
|
||||||
Panel = new Tsw1060(id, Global.ControlSystem);
|
Panel = new Tsw1060(id, Global.ControlSystem);
|
||||||
else if (type.Contains("dge"))
|
|
||||||
{
|
|
||||||
// TODO: Figure out how to get the trilist from a DgeController device
|
|
||||||
//Panel =
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
|
Debug.Console(0, this, Debug.ErrorLogLevel.Notice, "WARNING: Cannot create TSW controller with type '{0}'", type);
|
||||||
@@ -107,7 +110,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
|
|
||||||
Panel.LoadSmartObjects(sgdName);
|
Panel.LoadSmartObjects(sgdName);
|
||||||
Panel.SigChange += Tsw_SigChange;
|
Panel.SigChange += Panel_SigChange;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -163,7 +166,7 @@ namespace PepperDash.Essentials
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Tsw_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
void Panel_SigChange(object currentDevice, Crestron.SimplSharpPro.SigEventArgs args)
|
||||||
{
|
{
|
||||||
if (Debug.Level == 2)
|
if (Debug.Level == 2)
|
||||||
Debug.Console(2, this, "Sig change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
Debug.Console(2, this, "Sig change: {0} {1}={2}", args.Sig.Type, args.Sig.Number, args.Sig.StringValue);
|
||||||
|
|||||||
Submodule essentials-framework updated: 69dd391d19...8e275620b9
Reference in New Issue
Block a user