mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-09 09:45:06 +00:00
ecs-482 address; ecs-415 shutdown on contact; ecs-484 displays on tech
This commit is contained in:
@@ -11,6 +11,7 @@ using PepperDash.Essentials;
|
||||
using PepperDash.Essentials.Core;
|
||||
using PepperDash.Essentials.Core.SmartObjects;
|
||||
using PepperDash.Essentials.Core.Touchpanels.Keyboards;
|
||||
using PepperDash.Essentials.Devices.Displays;
|
||||
|
||||
namespace PepperDash.Essentials.UIDrivers
|
||||
{
|
||||
@@ -25,6 +26,10 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
/// </summary>
|
||||
SubpageReferenceList StatusList;
|
||||
/// <summary>
|
||||
/// The list of display controls
|
||||
/// </summary>
|
||||
SubpageReferenceList DisplayList;
|
||||
/// <summary>
|
||||
/// References lines in the list against device instances
|
||||
/// </summary>
|
||||
Dictionary<ICommunicationMonitor, uint> StatusListDeviceIndexes;
|
||||
@@ -96,6 +101,8 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
|
||||
BuildStatusList();
|
||||
|
||||
BuildDisplayList();
|
||||
|
||||
SetupPinModal();
|
||||
}
|
||||
|
||||
@@ -239,6 +246,47 @@ namespace PepperDash.Essentials.UIDrivers
|
||||
StatusList.Count = (ushort)i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds the list of display controls
|
||||
/// </summary>
|
||||
void BuildDisplayList()
|
||||
{
|
||||
DisplayList = new SubpageReferenceList(TriList, UISmartObjectJoin.TechDisplayControlsList, 10, 3, 3);
|
||||
|
||||
var devKeys = ConfigReader.ConfigObject.Devices.Where(d =>
|
||||
d.Group.Equals("display", StringComparison.OrdinalIgnoreCase)
|
||||
|| d.Group.Equals("projector", StringComparison.OrdinalIgnoreCase))
|
||||
.Select(dd => dd.Key);
|
||||
Debug.Console(1, "#################### Config has {0} displays", devKeys.Count());
|
||||
var disps = DeviceManager.AllDevices.Where(d =>
|
||||
devKeys.Contains(d.Key));
|
||||
Debug.Console(1, "#################### Devices has {0} displays", disps.Count());
|
||||
ushort i = 0;
|
||||
foreach (var disp in disps)
|
||||
{
|
||||
var display = disp as DisplayBase;
|
||||
if (display != null)
|
||||
{
|
||||
i++;
|
||||
DisplayList.StringInputSig(i, 1).StringValue = display.Name;
|
||||
DisplayList.GetBoolFeedbackSig(i, 1).SetSigFalseAction(display.PowerOn);
|
||||
DisplayList.GetBoolFeedbackSig(i, 2).SetSigFalseAction(display.PowerOff);
|
||||
DisplayList.GetBoolFeedbackSig(i, 3).SetSigFalseAction(() =>
|
||||
{ if (display is IInputHdmi1) (display as IInputHdmi1).InputHdmi1(); });
|
||||
DisplayList.GetBoolFeedbackSig(i, 4).SetSigFalseAction(() =>
|
||||
{ if (display is IInputHdmi2) (display as IInputHdmi2).InputHdmi2(); });
|
||||
DisplayList.GetBoolFeedbackSig(i, 5).SetSigFalseAction(() =>
|
||||
{ if (display is IInputHdmi3) (display as IInputHdmi3).InputHdmi3(); });
|
||||
DisplayList.GetBoolFeedbackSig(i, 6).SetSigFalseAction(() =>
|
||||
{ if (display is IInputHdmi4) (display as IInputHdmi4).InputHdmi4(); });
|
||||
DisplayList.GetBoolFeedbackSig(i, 7).SetSigFalseAction(() =>
|
||||
{ if (display is IInputDisplayPort1) (display as IInputDisplayPort1).InputDisplayPort1(); });
|
||||
}
|
||||
}
|
||||
|
||||
DisplayList.Count = i;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user