mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-01-31 05:14:51 +00:00
Major repo cleanout. Removes all files marked as REMOVE or MOVED and removes Cues and all assciated referenced.
This commit is contained in:
@@ -1,127 +0,0 @@
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public static class CommonBoolCue
|
||||
{
|
||||
public static readonly Cue Power = new Cue("Power", 101, eCueType.Bool);
|
||||
public static readonly Cue PowerOn = new Cue("PowerOn", 102, eCueType.Bool);
|
||||
public static readonly Cue PowerOff = new Cue("PowerOff", 103, eCueType.Bool);
|
||||
|
||||
public static readonly Cue HasPowerFeedback = new Cue("HasPowerFeedback", 101, eCueType.Bool);
|
||||
public static readonly Cue PowerOnFeedback = new Cue("PowerOnFeedback", 102, eCueType.Bool);
|
||||
public static readonly Cue IsOnlineFeedback = new Cue("IsOnlineFeedback", 104, eCueType.Bool);
|
||||
public static readonly Cue IsWarmingUp = new Cue("IsWarmingUp", 105, eCueType.Bool);
|
||||
public static readonly Cue IsCoolingDown = new Cue("IsCoolingDown", 106, eCueType.Bool);
|
||||
|
||||
public static readonly Cue Dash = new Cue("Dash", 109, eCueType.Bool);
|
||||
public static readonly Cue Digit0 = new Cue("Digit0", 110, eCueType.Bool);
|
||||
public static readonly Cue Digit1 = new Cue("Digit1", 111, eCueType.Bool);
|
||||
public static readonly Cue Digit2 = new Cue("Digit2", 112, eCueType.Bool);
|
||||
public static readonly Cue Digit3 = new Cue("Digit3", 113, eCueType.Bool);
|
||||
public static readonly Cue Digit4 = new Cue("Digit4", 114, eCueType.Bool);
|
||||
public static readonly Cue Digit5 = new Cue("Digit5", 115, eCueType.Bool);
|
||||
public static readonly Cue Digit6 = new Cue("Digit6", 116, eCueType.Bool);
|
||||
public static readonly Cue Digit7 = new Cue("Digit7", 117, eCueType.Bool);
|
||||
public static readonly Cue Digit8 = new Cue("Digit8", 118, eCueType.Bool);
|
||||
public static readonly Cue Digit9 = new Cue("Digit9", 119, eCueType.Bool);
|
||||
public static readonly Cue KeypadMisc1 = new Cue("KeypadMisc1", 120, eCueType.Bool);
|
||||
public static readonly Cue KeypadMisc2 = new Cue("KeypadMisc2", 121, eCueType.Bool);
|
||||
|
||||
public static readonly Cue NumericEnter = new Cue("Enter", 122, eCueType.Bool);
|
||||
public static readonly Cue ChannelUp = new Cue("ChannelUp", 123, eCueType.Bool);
|
||||
public static readonly Cue ChannelDown = new Cue("ChannelDown", 124, eCueType.Bool);
|
||||
public static readonly Cue Last = new Cue("Last", 125, eCueType.Bool);
|
||||
public static readonly Cue OpenClose = new Cue("OpenClose", 126, eCueType.Bool);
|
||||
public static readonly Cue Subtitle = new Cue("Subtitle", 127, eCueType.Bool);
|
||||
public static readonly Cue Audio = new Cue("Audio", 128, eCueType.Bool);
|
||||
public static readonly Cue Info = new Cue("Info", 129, eCueType.Bool);
|
||||
public static readonly Cue Menu = new Cue("Menu", 130, eCueType.Bool);
|
||||
public static readonly Cue DeviceMenu = new Cue("DeviceMenu", 131, eCueType.Bool);
|
||||
public static readonly Cue Return = new Cue("Return", 132, eCueType.Bool);
|
||||
public static readonly Cue Back = new Cue("Back", 133, eCueType.Bool);
|
||||
public static readonly Cue Exit = new Cue("Exit", 134, eCueType.Bool);
|
||||
public static readonly Cue Clear = new Cue("Clear", 135, eCueType.Bool);
|
||||
public static readonly Cue List = new Cue("List", 136, eCueType.Bool);
|
||||
public static readonly Cue Guide = new Cue("Guide", 137, eCueType.Bool);
|
||||
public static readonly Cue Am = new Cue("Am", 136, eCueType.Bool);
|
||||
public static readonly Cue Fm = new Cue("Fm", 137, eCueType.Bool);
|
||||
public static readonly Cue Up = new Cue("Up", 138, eCueType.Bool);
|
||||
public static readonly Cue Down = new Cue("Down", 139, eCueType.Bool);
|
||||
public static readonly Cue Left = new Cue("Left", 140, eCueType.Bool);
|
||||
public static readonly Cue Right = new Cue("Right", 141, eCueType.Bool);
|
||||
public static readonly Cue Select = new Cue("Select", 142, eCueType.Bool);
|
||||
public static readonly Cue SmartApps = new Cue("SmartApps", 143, eCueType.Bool);
|
||||
public static readonly Cue Dvr = new Cue("Dvr", 144, eCueType.Bool);
|
||||
|
||||
public static readonly Cue Play = new Cue("Play", 145, eCueType.Bool);
|
||||
public static readonly Cue Pause = new Cue("Pause", 146, eCueType.Bool);
|
||||
public static readonly Cue Stop = new Cue("Stop", 147, eCueType.Bool);
|
||||
public static readonly Cue ChapNext = new Cue("ChapNext", 148, eCueType.Bool);
|
||||
public static readonly Cue ChapPrevious = new Cue("ChapPrevious", 149, eCueType.Bool);
|
||||
public static readonly Cue Rewind = new Cue("Rewind", 150, eCueType.Bool);
|
||||
public static readonly Cue Ffwd = new Cue("Ffwd", 151, eCueType.Bool);
|
||||
public static readonly Cue Replay = new Cue("Replay", 152, eCueType.Bool);
|
||||
public static readonly Cue Advance = new Cue("Advance", 153, eCueType.Bool);
|
||||
public static readonly Cue Record = new Cue("Record", 154, eCueType.Bool);
|
||||
public static readonly Cue Red = new Cue("Red", 155, eCueType.Bool);
|
||||
public static readonly Cue Green = new Cue("Green", 156, eCueType.Bool);
|
||||
public static readonly Cue Yellow = new Cue("Yellow", 157, eCueType.Bool);
|
||||
public static readonly Cue Blue = new Cue("Blue", 158, eCueType.Bool);
|
||||
public static readonly Cue Home = new Cue("Home", 159, eCueType.Bool);
|
||||
public static readonly Cue PopUp = new Cue("PopUp", 160, eCueType.Bool);
|
||||
public static readonly Cue PageUp = new Cue("PageUp", 161, eCueType.Bool);
|
||||
public static readonly Cue PageDown = new Cue("PageDown", 162, eCueType.Bool);
|
||||
public static readonly Cue Search = new Cue("Search", 163, eCueType.Bool);
|
||||
public static readonly Cue Setup = new Cue("Setup", 164, eCueType.Bool);
|
||||
public static readonly Cue RStep = new Cue("RStep", 165, eCueType.Bool);
|
||||
public static readonly Cue FStep = new Cue("FStep", 166, eCueType.Bool);
|
||||
|
||||
public static readonly Cue IsConnected = new Cue("IsConnected", 281, eCueType.Bool);
|
||||
public static readonly Cue IsOk = new Cue("IsOk", 282, eCueType.Bool);
|
||||
public static readonly Cue InWarning = new Cue("InWarning", 283, eCueType.Bool);
|
||||
public static readonly Cue InError = new Cue("InError", 284, eCueType.Bool);
|
||||
public static readonly Cue StatusUnknown = new Cue("StatusUnknown", 285, eCueType.Bool);
|
||||
|
||||
public static readonly Cue VolumeUp = new Cue("VolumeUp", 401, eCueType.Bool);
|
||||
public static readonly Cue VolumeDown = new Cue("VolumeDown", 402, eCueType.Bool);
|
||||
public static readonly Cue MuteOn = new Cue("MuteOn", 403, eCueType.Bool);
|
||||
public static readonly Cue MuteOff = new Cue("MuteOff", 404, eCueType.Bool);
|
||||
public static readonly Cue MuteToggle = new Cue("MuteToggle", 405, eCueType.Bool);
|
||||
public static readonly Cue ShowVolumeButtons = new Cue("ShowVolumeButtons", 406, eCueType.Bool);
|
||||
public static readonly Cue ShowVolumeSlider = new Cue("ShowVolumeSlider", 407, eCueType.Bool);
|
||||
|
||||
public static readonly Cue Hdmi1 = new Cue("Hdmi1", 451, eCueType.Bool);
|
||||
public static readonly Cue Hdmi2 = new Cue("Hdmi2", 452, eCueType.Bool);
|
||||
public static readonly Cue Hdmi3 = new Cue("Hdmi3", 453, eCueType.Bool);
|
||||
public static readonly Cue Hdmi4 = new Cue("Hdmi4", 454, eCueType.Bool);
|
||||
public static readonly Cue Hdmi5 = new Cue("Hdmi5", 455, eCueType.Bool);
|
||||
public static readonly Cue Hdmi6 = new Cue("Hdmi6", 456, eCueType.Bool);
|
||||
public static readonly Cue DisplayPort1 = new Cue("DisplayPort1", 457, eCueType.Bool);
|
||||
public static readonly Cue DisplayPort2 = new Cue("DisplayPort2", 458, eCueType.Bool);
|
||||
public static readonly Cue Dvi1 = new Cue("Dvi1", 459, eCueType.Bool);
|
||||
public static readonly Cue Dvi2 = new Cue("Dvi2", 460, eCueType.Bool);
|
||||
public static readonly Cue Video1 = new Cue("Video1", 461, eCueType.Bool);
|
||||
public static readonly Cue Video2 = new Cue("Video2", 462, eCueType.Bool);
|
||||
public static readonly Cue Component1 = new Cue("Component1", 463, eCueType.Bool);
|
||||
public static readonly Cue Component2 = new Cue("Component2", 464, eCueType.Bool);
|
||||
public static readonly Cue Vga1 = new Cue("Vga1", 465, eCueType.Bool);
|
||||
public static readonly Cue Vga2 = new Cue("Vga2", 466, eCueType.Bool);
|
||||
public static readonly Cue Rgb1 = new Cue("Rgb1", 467, eCueType.Bool);
|
||||
public static readonly Cue Rgb2 = new Cue("Rgb2", 468, eCueType.Bool);
|
||||
public static readonly Cue Antenna = new Cue("Antenna", 469, eCueType.Bool);
|
||||
|
||||
public static readonly Cue InCall = new Cue("InCall", 501, eCueType.Bool);
|
||||
}
|
||||
|
||||
public static class CommonIntCue
|
||||
{
|
||||
public static readonly Cue MainVolumeLevel = new Cue("MainVolumeLevel", 401, eCueType.Int);
|
||||
public static readonly Cue MainVolumeLevelFeedback = new Cue("MainVolumeLevelFeedback", 401, eCueType.Int);
|
||||
}
|
||||
|
||||
public static class CommonStringCue
|
||||
{
|
||||
public static readonly Cue IpConnectionsText = new Cue("IpConnectionsText", 9999, eCueType.String);
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Encapsulates a string-named, joined and typed command to a device
|
||||
/// </summary>
|
||||
[Obsolete()]
|
||||
public class DevAction
|
||||
{
|
||||
public Cue Cue { get; private set; }
|
||||
public Action<object> Action { get; private set; }
|
||||
|
||||
|
||||
public DevAction(Cue cue, Action<object> action)
|
||||
{
|
||||
Cue = cue;
|
||||
Action = action;
|
||||
}
|
||||
}
|
||||
|
||||
public enum eCueType
|
||||
{
|
||||
Bool, Int, String, Serial, Void, Other
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// The Cue class is a container to represent a name / join number / type for simplifying
|
||||
/// commands coming into devices.
|
||||
/// </summary>
|
||||
public class Cue
|
||||
{
|
||||
public string Name { get; private set; }
|
||||
public uint Number { get; private set; }
|
||||
public eCueType Type { get; private set; }
|
||||
|
||||
public Cue(string name, uint join, eCueType type)
|
||||
{
|
||||
Name = name;
|
||||
Number = join;
|
||||
Type = type;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override that prints out the cue's data
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
return string.Format("{0} Cue '{1}'-{2}", Type, Name, Number);
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// Returns a new Cue with JoinNumber offset
|
||||
///// </summary>
|
||||
//public Cue GetOffsetCopy(uint offset)
|
||||
//{
|
||||
// return new Cue(Name, Number + offset, Type);
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to create a Cue of Bool type
|
||||
/// </summary>
|
||||
/// <returns>Cue</returns>
|
||||
public static Cue BoolCue(string name, uint join)
|
||||
{
|
||||
return new Cue(name, join, eCueType.Bool);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to create a Cue of ushort type
|
||||
/// </summary>
|
||||
/// <returns>Cue</returns>
|
||||
public static Cue UShortCue(string name, uint join)
|
||||
{
|
||||
return new Cue(name, join, eCueType.Int);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to create a Cue of string type
|
||||
/// </summary>
|
||||
/// <returns>Cue</returns>
|
||||
public static Cue StringCue(string name, uint join)
|
||||
{
|
||||
return new Cue(name, join, eCueType.String);
|
||||
}
|
||||
|
||||
public static readonly Cue DefaultBoolCue = new Cue("-none-", 0, eCueType.Bool);
|
||||
public static readonly Cue DefaultIntCue = new Cue("-none-", 0, eCueType.Int);
|
||||
public static readonly Cue DefaultStringCue = new Cue("-none-", 0, eCueType.String);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
|
||||
public enum AudioChangeType
|
||||
{
|
||||
Mute, Volume
|
||||
}
|
||||
|
||||
public class AudioChangeEventArgs
|
||||
{
|
||||
public AudioChangeType ChangeType { get; private set; }
|
||||
public IBasicVolumeControls AudioDevice { get; private set; }
|
||||
|
||||
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
||||
{
|
||||
ChangeType = changeType;
|
||||
AudioDevice = device;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,9 +26,7 @@ namespace PepperDash.Essentials.Core
|
||||
// get the properties and set them into a new collection of NameType wrappers
|
||||
var props = t.GetProperties().Select(p => new PropertyNameType(p, t));
|
||||
|
||||
|
||||
|
||||
var feedbacks = source.Feedbacks.OrderBy(x => x.Type);
|
||||
var feedbacks = source.Feedbacks;
|
||||
if (feedbacks != null)
|
||||
{
|
||||
Debug.Console(0, source, "\n\nAvailable feedbacks:");
|
||||
|
||||
@@ -120,26 +120,5 @@ namespace PepperDash.Essentials.Core
|
||||
Key, IrPort.IRDriverFileNameByIRDriverId(IrPortUid), command);
|
||||
}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// When fed a dictionary of uint, string, will return UOs for each item,
|
||||
///// attached to this IrOutputPort
|
||||
///// </summary>
|
||||
///// <param name="numStringDict"></param>
|
||||
///// <returns></returns>
|
||||
//public List<CueActionPair> GetUOsForIrCommands(Dictionary<Cue, string> numStringDict)
|
||||
//{
|
||||
// var funcs = new List<CueActionPair>(numStringDict.Count);
|
||||
// foreach (var kvp in numStringDict)
|
||||
// {
|
||||
// // Have to assign these locally because of kvp's scope
|
||||
// var cue = kvp.Key;
|
||||
// var command = kvp.Value;
|
||||
// funcs.Add(new BoolCueActionPair(cue, b => this.PressRelease(command, b)));
|
||||
// }
|
||||
// return funcs;
|
||||
//}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
//public interface IVolumeFunctions
|
||||
//{
|
||||
// BoolCueActionPair VolumeUpCueActionPair { get; }
|
||||
// BoolCueActionPair VolumeDownCueActionPair { get; }
|
||||
// BoolCueActionPair MuteToggleCueActionPair { get; }
|
||||
//}
|
||||
|
||||
//public interface IVolumeTwoWay : IVolumeFunctions
|
||||
//{
|
||||
// IntFeedback VolumeLevelFeedback { get; }
|
||||
// UShortCueActionPair VolumeLevelCueActionPair { get; }
|
||||
// BoolFeedback IsMutedFeedback { get; }
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
/////
|
||||
///// </summary>
|
||||
//public static class IFunctionListExtensions
|
||||
//{
|
||||
// public static string GetFunctionsConsoleList(this IHasCueActionList device)
|
||||
// {
|
||||
// var sb = new StringBuilder();
|
||||
// var list = device.CueActionList;
|
||||
// foreach (var cap in list)
|
||||
// sb.AppendFormat("{0,-15} {1,4} {2}\r", cap.Cue.Name, cap.Cue.Number, cap.GetType().Name);
|
||||
// return sb.ToString();
|
||||
// }
|
||||
//}
|
||||
|
||||
public enum AudioChangeType
|
||||
{
|
||||
Mute, Volume
|
||||
}
|
||||
|
||||
public class AudioChangeEventArgs
|
||||
{
|
||||
public AudioChangeType ChangeType { get; private set; }
|
||||
public IBasicVolumeControls AudioDevice { get; private set; }
|
||||
|
||||
public AudioChangeEventArgs(IBasicVolumeControls device, AudioChangeType changeType)
|
||||
{
|
||||
ChangeType = changeType;
|
||||
AudioDevice = device;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
// public abstract class IRDisplayBase : DisplayBase, IHasCueActionList
|
||||
// {
|
||||
// public IrOutputPortController IrPort { get; private set; }
|
||||
// /// <summary>
|
||||
// /// Default to 200ms
|
||||
// /// </summary>
|
||||
// public ushort IrPulseTime { get; set; }
|
||||
// bool _PowerIsOn;
|
||||
// bool _IsWarmingUp;
|
||||
// bool _IsCoolingDown;
|
||||
|
||||
// /// <summary>
|
||||
// /// FunctionList is pre-defined to have power commands.
|
||||
// /// </summary>
|
||||
// public IRDisplayBase(string key, string name, IROutputPort port, string irDriverFilepath)
|
||||
// : base(key, name)
|
||||
// {
|
||||
// IrPort = new IrOutputPortController("ir-" + key, port, irDriverFilepath);
|
||||
// IrPulseTime = 200;
|
||||
// WarmupTime = 7000;
|
||||
// CooldownTime = 10000;
|
||||
|
||||
// CueActionList = new List<CueActionPair>
|
||||
// {
|
||||
// new BoolCueActionPair(CommonBoolCue.Power, b=> PowerToggle()),
|
||||
// new BoolCueActionPair(CommonBoolCue.PowerOn, b=> PowerOn()),
|
||||
// new BoolCueActionPair(CommonBoolCue.PowerOff, b=> PowerOff()),
|
||||
// };
|
||||
// }
|
||||
|
||||
// public override void PowerOn()
|
||||
// {
|
||||
// if (!PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
|
||||
// {
|
||||
// _IsWarmingUp = true;
|
||||
// IsWarmingUpFeedback.FireUpdate();
|
||||
// // Fake power-up cycle
|
||||
// WarmupTimer = new CTimer(o =>
|
||||
// {
|
||||
// _IsWarmingUp = false;
|
||||
// _PowerIsOn = true;
|
||||
// IsWarmingUpFeedback.FireUpdate();
|
||||
// PowerIsOnFeedback.FireUpdate();
|
||||
// }, WarmupTime);
|
||||
// }
|
||||
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_ON, IrPulseTime);
|
||||
// }
|
||||
|
||||
// public override void PowerOff()
|
||||
// {
|
||||
// // If a display has unreliable-power off feedback, just override this and
|
||||
// // remove this check.
|
||||
// if (PowerIsOnFeedback.BoolValue && !_IsWarmingUp && !_IsCoolingDown)
|
||||
// {
|
||||
// _IsCoolingDown = true;
|
||||
// _PowerIsOn = false;
|
||||
// PowerIsOnFeedback.FireUpdate();
|
||||
// IsCoolingDownFeedback.FireUpdate();
|
||||
// // Fake cool-down cycle
|
||||
// CooldownTimer = new CTimer(o =>
|
||||
// {
|
||||
// _IsCoolingDown = false;
|
||||
// IsCoolingDownFeedback.FireUpdate();
|
||||
// }, CooldownTime);
|
||||
// }
|
||||
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER_OFF, IrPulseTime);
|
||||
// }
|
||||
|
||||
// public override void PowerToggle()
|
||||
// {
|
||||
// // Not sure how to handle the feedback, but we should default to power off fb.
|
||||
// // Does this need to trigger feedback??
|
||||
// _PowerIsOn = false;
|
||||
// IrPort.Pulse(IROutputStandardCommands.IROut_POWER, IrPulseTime);
|
||||
// }
|
||||
|
||||
// #region IFunctionList Members
|
||||
|
||||
// public List<CueActionPair> CueActionList
|
||||
// {
|
||||
// get;
|
||||
// private set;
|
||||
// }
|
||||
|
||||
// #endregion
|
||||
|
||||
// protected override Func<bool> PowerIsOnOutputFunc { get { return () => _PowerIsOn; } }
|
||||
// protected override Func<bool> IsCoolingDownOutputFunc { get { return () => _IsCoolingDown; } }
|
||||
// protected override Func<bool> IsWarmingUpOutputFunc { get { return () => _IsWarmingUp; } }
|
||||
|
||||
// public override void ExecuteSwitch(object selector)
|
||||
// {
|
||||
// IrPort.Pulse((string)selector, IrPulseTime);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -30,15 +30,4 @@ namespace PepperDash.Essentials.Core.Ethernet
|
||||
() => CrestronEthernetHelper.GetEthernetParameter(
|
||||
CrestronEthernetHelper.ETHERNET_PARAMETER_TO_GET.GET_CURRENT_ROUTER, 0));
|
||||
}
|
||||
|
||||
public static class EthernetCue
|
||||
{
|
||||
public static readonly Cue LinkActive = Cue.BoolCue("LinkActive", 1);
|
||||
public static readonly Cue DhcpActive = Cue.BoolCue("DhcpActive", 2);
|
||||
|
||||
public static readonly Cue Hostname = Cue.StringCue("Hostname", 1);
|
||||
public static readonly Cue IpAddress0 = Cue.StringCue("IpAddress0", 2);
|
||||
public static readonly Cue SubnetMask0 = Cue.StringCue("SubnetMask0", 3);
|
||||
public static readonly Cue DefaultGateway0 = Cue.StringCue("DefaultGateway0", 4);
|
||||
}
|
||||
}
|
||||
@@ -19,8 +19,6 @@ namespace PepperDash.Essentials.Core
|
||||
public override bool BoolValue { get { return _BoolValue; } }
|
||||
bool _BoolValue;
|
||||
|
||||
public override eCueType Type { get { return eCueType.Bool; } }
|
||||
|
||||
/// <summary>
|
||||
/// Fake value to be used in test mode
|
||||
/// </summary>
|
||||
@@ -45,12 +43,6 @@ namespace PepperDash.Essentials.Core
|
||||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
//public BoolFeedback(Cue cue, Func<bool> valueFunc)
|
||||
// : base(cue)
|
||||
//{
|
||||
// if (cue == null) throw new ArgumentNullException("cue");
|
||||
// ValueFunc = valueFunc;
|
||||
//}
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
|
||||
@@ -20,10 +20,6 @@ namespace PepperDash.Essentials.Core
|
||||
public virtual string StringValue { get { return ""; } }
|
||||
public virtual string SerialValue { get { return ""; } }
|
||||
|
||||
//public Cue Cue { get; private set; }
|
||||
|
||||
public abstract eCueType Type { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Feedbacks can be put into test mode for simulation of events without real data.
|
||||
/// Using JSON debugging methods and the Set/ClearTestValue methods, we can simulate
|
||||
@@ -46,10 +42,7 @@ namespace PepperDash.Essentials.Core
|
||||
Key = key;
|
||||
}
|
||||
|
||||
//protected Feedback(Cue cue)
|
||||
//{
|
||||
// Cue = cue;
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Clears test mode and fires update.
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace PepperDash.Essentials.Core
|
||||
int _IntValue;
|
||||
public ushort UShortValue { get { return (ushort)_IntValue; } }
|
||||
|
||||
public override eCueType Type { get { return eCueType.Int; } }
|
||||
//public override eCueType Type { get { return eCueType.Int; } }
|
||||
|
||||
public int TestValue { get; private set; }
|
||||
|
||||
@@ -34,13 +34,6 @@ namespace PepperDash.Essentials.Core
|
||||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
//public IntFeedback(Cue cue, Func<int> valueFunc)
|
||||
// : base(cue)
|
||||
//{
|
||||
// if (cue == null) throw new ArgumentNullException("cue");
|
||||
// ValueFunc = valueFunc;
|
||||
//}
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
var newValue = InTestMode ? TestValue : ValueFunc.Invoke();
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace PepperDash.Essentials.Core
|
||||
public override string SerialValue { get { return _SerialValue; } }
|
||||
string _SerialValue;
|
||||
|
||||
public override eCueType Type { get { return eCueType.Serial; } }
|
||||
//public override eCueType Type { get { return eCueType.Serial; } }
|
||||
|
||||
/// <summary>
|
||||
/// Used in testing. Set/Clear functions
|
||||
|
||||
@@ -12,8 +12,6 @@ namespace PepperDash.Essentials.Core
|
||||
public override string StringValue { get { return _StringValue; } } // ValueFunc.Invoke(); } }
|
||||
string _StringValue;
|
||||
|
||||
public override eCueType Type { get { return eCueType.String; } }
|
||||
|
||||
/// <summary>
|
||||
/// Used in testing. Set/Clear functions
|
||||
/// </summary>
|
||||
@@ -36,13 +34,7 @@ namespace PepperDash.Essentials.Core
|
||||
ValueFunc = valueFunc;
|
||||
}
|
||||
|
||||
//public StringFeedback(Cue cue, Func<string> valueFunc)
|
||||
// : base(cue)
|
||||
//{
|
||||
// if (cue == null) throw new ArgumentNullException("cue");
|
||||
// ValueFunc = valueFunc;
|
||||
|
||||
//}
|
||||
|
||||
public override void FireUpdate()
|
||||
{
|
||||
|
||||
@@ -83,16 +83,4 @@ namespace PepperDash.Essentials.License
|
||||
return string.Format("License Status: {0}", IsValid ? "Valid" : "Not Valid");
|
||||
}
|
||||
}
|
||||
|
||||
public class EssentialsLicenseManager
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class LicenseCue
|
||||
{
|
||||
public static Cue LicenseIsValid = Cue.BoolCue("LicenseIsValid", 15991);
|
||||
|
||||
public static Cue LicenseMessage = Cue.StringCue("LicenseMessage", 15991);
|
||||
}
|
||||
}
|
||||
@@ -111,8 +111,8 @@
|
||||
<Reference Include="System.Data" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Comm and IR\CecPortController.cs" />
|
||||
<Compile Include="Comm and IR\GenericComm.cs" />
|
||||
<Compile Include="Config\Comm and IR\CecPortController.cs" />
|
||||
<Compile Include="Config\Comm and IR\GenericComm.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigUpdater.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigReader.cs" />
|
||||
<Compile Include="Config\Essentials\ConfigWriter.cs" />
|
||||
@@ -153,16 +153,15 @@
|
||||
<Compile Include="Microphone Privacy\MicrophonePrivacyController.cs" />
|
||||
<Compile Include="Microphone Privacy\MicrophonePrivacyControllerConfig.cs" />
|
||||
<Compile Include="Ramps and Increments\ActionIncrementer.cs" />
|
||||
<Compile Include="Comm and IR\CommFactory.cs" />
|
||||
<Compile Include="Comm and IR\CommunicationExtras.cs" />
|
||||
<Compile Include="Comm and IR\ComSpecJsonConverter.cs" />
|
||||
<Compile Include="Comm and IR\ConsoleCommMockDevice.cs" />
|
||||
<Compile Include="Comm and IR\IRPortHelper.cs" />
|
||||
<Compile Include="Config\Comm and IR\CommFactory.cs" />
|
||||
<Compile Include="Config\Comm and IR\CommunicationExtras.cs" />
|
||||
<Compile Include="Config\Comm and IR\ComSpecJsonConverter.cs" />
|
||||
<Compile Include="Config\Comm and IR\ConsoleCommMockDevice.cs" />
|
||||
<Compile Include="Config\Comm and IR\IRPortHelper.cs" />
|
||||
<Compile Include="Config\BasicConfig.cs" />
|
||||
<Compile Include="Config\ConfigPropertiesHelpers.cs" />
|
||||
<Compile Include="Config\InfoConfig.cs" />
|
||||
<Compile Include="Config\DeviceConfig.cs" />
|
||||
<Compile Include="Constants\CommonCues.cs" />
|
||||
<Compile Include="Devices\DisplayUiConstants.cs" />
|
||||
<Compile Include="Devices\IUsageTracking.cs" />
|
||||
<Compile Include="Devices\DeviceJsonApi.cs" />
|
||||
@@ -199,14 +198,13 @@
|
||||
<Compile Include="Monitoring\StatusMonitorCollection.cs" />
|
||||
<Compile Include="Monitoring\CrestronGenericBaseCommunicationMonitor.cs" />
|
||||
<Compile Include="Monitoring\StatusMonitorBase.cs" />
|
||||
<Compile Include="Monitoring\Interfaces and things.cs" />
|
||||
<Compile Include="Monitoring\Interfaces.cs" />
|
||||
<Compile Include="Monitoring\GenericCommunicationMonitor.cs" />
|
||||
<Compile Include="Devices\NewInterfaces.cs" />
|
||||
<Compile Include="Devices\AudioInterfaces.cs" />
|
||||
<Compile Include="Devices\IAttachVideoStatusExtensions.cs" />
|
||||
<Compile Include="Devices\IHasFeedbacks.cs" />
|
||||
<Compile Include="Devices\SmartObjectBaseTypes.cs" />
|
||||
<Compile Include="Devices\PresentationDeviceType.cs" />
|
||||
<Compile Include="Display\DELETE IRDisplayBase.cs" />
|
||||
<Compile Include="Display\MockDisplay.cs" />
|
||||
<Compile Include="Ethernet\EthernetStatistics.cs" />
|
||||
<Compile Include="Global\Global.cs" />
|
||||
@@ -229,25 +227,20 @@
|
||||
<Compile Include="SmartObjects\SmartObjectNumeric.cs" />
|
||||
<Compile Include="SmartObjects\SmartObjectDynamicList.cs" />
|
||||
<Compile Include="SmartObjects\SmartObjectDPad.cs" />
|
||||
<Compile Include="SmartObjects\SmartObjectHelper.cs" />
|
||||
<Compile Include="SmartObjects\SmartObjectHelperBase.cs" />
|
||||
<Compile Include="Routing\TieLine.cs" />
|
||||
<Compile Include="Timers\CountdownTimer.cs" />
|
||||
<Compile Include="Touchpanels\CrestronTouchpanelPropertiesConfig.cs" />
|
||||
<Compile Include="Touchpanels\Interfaces.cs" />
|
||||
<Compile Include="Touchpanels\Keyboards\HabaneroKeyboardController.cs" />
|
||||
<Compile Include="Touchpanels\MOVED LargeTouchpanelControllerBase.cs" />
|
||||
<Compile Include="Touchpanels\TriListExtensions.cs" />
|
||||
<Compile Include="Touchpanels\MOVED UIControllers\DevicePageControllerBase.cs" />
|
||||
<Compile Include="UI PageManagers\BlurayPageManager.cs" />
|
||||
<Compile Include="UI PageManagers\SetTopBoxThreePanelPageManager.cs" />
|
||||
<Compile Include="UI PageManagers\SinglePageManager.cs" />
|
||||
<Compile Include="UI PageManagers\PageManager.cs" />
|
||||
<Compile Include="UI PageManagers\SetTopBoxTwoPanelPageManager.cs" />
|
||||
<Compile Include="VideoStatus\VideoStatusOutputs.cs" />
|
||||
<Compile Include="VideoStatus\VideoStatusCues.cs" />
|
||||
<Compile Include="Cues and DevAction\Cues.cs" />
|
||||
<Compile Include="Comm and IR\ComPortController.cs" />
|
||||
<Compile Include="Config\Comm and IR\ComPortController.cs" />
|
||||
<Compile Include="Crestron\CrestronGenericBaseDevice.cs" />
|
||||
<Compile Include="DeviceControlsParentInterfaces\IPresentationSource.cs" />
|
||||
<Compile Include="Devices\DeviceManager.cs" />
|
||||
@@ -255,23 +248,17 @@
|
||||
<Compile Include="Display\DisplayBase.cs" />
|
||||
<Compile Include="Feedbacks\FeedbackBase.cs" />
|
||||
<Compile Include="Room\Room.cs" />
|
||||
<Compile Include="Room\RoomCues.cs" />
|
||||
<Compile Include="SmartObjects\SubpageReferencList\SourceListSubpageReferenceList.cs" />
|
||||
<Compile Include="Touchpanels\ModalDialog.cs" />
|
||||
<Compile Include="Touchpanels\SmartGraphicsTouchpanelControllerBase.cs" />
|
||||
<Compile Include="TriListBridges\HandlerBridge.cs" />
|
||||
<Compile Include="Devices\FIND HOMES Interfaces.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SigHelper.cs" />
|
||||
<Compile Include="REMOVE SigId.cs" />
|
||||
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceList.cs" />
|
||||
<Compile Include="SmartObjects\SubpageReferencList\SubpageReferenceListItem.cs" />
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\ControlSystem.cfg" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="bin\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CompactFramework.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
<VisualStudio>
|
||||
|
||||
@@ -1,37 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using Crestron.SimplSharpPro;
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
// public class SigId
|
||||
// {
|
||||
// public uint Number { get; private set; }
|
||||
// public eSigType Type { get; private set; }
|
||||
|
||||
// public SigId(eSigType type, uint number)
|
||||
// {
|
||||
// Type = type;
|
||||
// Number = number;
|
||||
// }
|
||||
|
||||
// public override bool Equals(object id)
|
||||
// {
|
||||
// if (id is SigId)
|
||||
// {
|
||||
// var sigId = id as SigId;
|
||||
// return this.Number == sigId.Number && this.Type == sigId.Type;
|
||||
// }
|
||||
// else
|
||||
// return base.Equals(id);
|
||||
// }
|
||||
|
||||
// public override int GetHashCode()
|
||||
// {
|
||||
// return base.GetHashCode();
|
||||
// }
|
||||
// }
|
||||
|
||||
//}
|
||||
@@ -1,61 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
using PepperDash.Essentials.Core;
|
||||
|
||||
namespace PepperDash.Essentials
|
||||
{
|
||||
public static class RoomCue
|
||||
{
|
||||
// Commands/
|
||||
//bools
|
||||
public static readonly Cue RoomOnToggle = Cue.BoolCue("RoomOnToggle", 2001);
|
||||
public static readonly Cue RoomOn = Cue.BoolCue("RoomOn", 2002);
|
||||
public static readonly Cue RoomOff = Cue.BoolCue("RoomOff", 2003);
|
||||
public static readonly Cue VolumeUp = Cue.BoolCue("VolumeUp", 2011);
|
||||
public static readonly Cue VolumeDown = Cue.BoolCue("VolumeDown", 2012);
|
||||
public static readonly Cue VolumeDefault = Cue.BoolCue("VolumeDefault", 2013);
|
||||
public static readonly Cue MuteToggle = Cue.BoolCue("MuteToggle", 2014);
|
||||
public static readonly Cue MuteOn = Cue.BoolCue("MuteOn", 2015);
|
||||
public static readonly Cue MuteOff = Cue.BoolCue("MuteOff", 2016);
|
||||
|
||||
//ushorts
|
||||
public static readonly Cue SelectSourceByNumber = Cue.UShortCue("SelectSourceByNumber", 2001);
|
||||
public static readonly Cue VolumeLevel = Cue.UShortCue("VolumeLevel", 2011);
|
||||
public static readonly Cue VolumeLevelPercent = Cue.UShortCue("VolumeLevelPercent", 2012);
|
||||
|
||||
//strings
|
||||
public static readonly Cue SelectSourceByKey = Cue.StringCue("SelectSourceByKey", 2001);
|
||||
|
||||
// Outputs
|
||||
//Bools
|
||||
public static readonly Cue RoomIsOn = Cue.BoolCue("RoomIsOn", 2002);
|
||||
public static readonly Cue RoomIsOnStandby = Cue.BoolCue("RoomIsOnStandby", 2003);
|
||||
public static readonly Cue RoomIsWarmingUp = Cue.BoolCue("RoomIsWarmingUp", 2004);
|
||||
public static readonly Cue RoomIsCoolingDown = Cue.BoolCue("RoomIsCoolingDown", 2005);
|
||||
public static readonly Cue RoomIsOccupied = Cue.BoolCue("RoomIsOccupied", 2006);
|
||||
|
||||
//Ushorts
|
||||
public static readonly Cue SourcesCount = Cue.UShortCue("SourcesCount", 2001);
|
||||
public static readonly Cue CurrentSourceNumber = Cue.UShortCue("CurrentSourceNumber", 2002);
|
||||
public static readonly Cue CurrentSourceType = Cue.UShortCue("CurrentSourceType", 2003);
|
||||
|
||||
//Strings
|
||||
public static readonly Cue CurrentSourceKey = Cue.StringCue("CurrentSourceKey", 2001);
|
||||
public static readonly Cue CurrentSourceName = Cue.StringCue("CurrentSourceName", 2002);
|
||||
|
||||
public static readonly Cue VolumeLevelText = Cue.StringCue("VolumeLevelText", 2012);
|
||||
|
||||
public static readonly Cue Key = Cue.StringCue("RoomKey", 2021);
|
||||
public static readonly Cue Name = Cue.StringCue("RoomName", 2022);
|
||||
public static readonly Cue Description = Cue.StringCue("Description", 2023);
|
||||
public static readonly Cue HelpMessage = Cue.StringCue("HelpMessage", 2024);
|
||||
|
||||
//Special
|
||||
public static readonly Cue Source = new Cue("Source", 0, eCueType.Other);
|
||||
}
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Crestron.SimplSharpPro;
|
||||
using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
using PepperDash.Core;
|
||||
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public class SmartObjectHelper
|
||||
{
|
||||
public static uint GetSmartObjectJoinForTypeAndObject(uint sourceType, uint typeOffset)
|
||||
{
|
||||
return (uint)(10000 + (sourceType * 100) + typeOffset);
|
||||
}
|
||||
|
||||
//public static void DumpSmartObject(SmartGraphicsTouchpanelControllerBase tp, uint id)
|
||||
//{
|
||||
// if (!tp.TriList.SmartObjects.Contains(id))
|
||||
// {
|
||||
// Debug.Console(0, tp, "does not contain smart object ID {0}", id);
|
||||
// return;
|
||||
// }
|
||||
// var so = tp.TriList.SmartObjects[id];
|
||||
// Debug.Console(0, tp, "Signals for smart object ID {0}", id);
|
||||
// Debug.Console(0, "BooleanInput -------------------------------");
|
||||
// foreach (var s in so.BooleanInput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
// Debug.Console(0, "UShortInput -------------------------------");
|
||||
// foreach (var s in so.UShortInput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
// Debug.Console(0, "StringInput -------------------------------");
|
||||
// foreach (var s in so.StringInput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
// Debug.Console(0, "BooleanOutput -------------------------------");
|
||||
// foreach (var s in so.BooleanOutput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
// Debug.Console(0, "UShortOutput -------------------------------");
|
||||
// foreach (var s in so.UShortOutput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
// Debug.Console(0, "StringOutput -------------------------------");
|
||||
// foreach (var s in so.StringOutput)
|
||||
// Debug.Console(0, " {0,5} {1}", s.Number, s.Name);
|
||||
//}
|
||||
|
||||
///// <summary>
|
||||
///// Inserts/removes the appropriate UO's onto sigs
|
||||
///// </summary>
|
||||
///// <param name="triList"></param>
|
||||
///// <param name="smartObjectId"></param>
|
||||
///// <param name="deviceUserObjects"></param>
|
||||
///// <param name="state"></param>
|
||||
//public static void LinkNumpadWithUserObjects(BasicTriListWithSmartObject triList,
|
||||
// uint smartObjectId, List<CueActionPair> deviceUserObjects, Cue Misc_1Function, Cue Misc_2Function, bool state)
|
||||
//{
|
||||
// var sigDict = new Dictionary<string, Cue>
|
||||
// {
|
||||
// { "0", CommonBoolCue.Digit0 },
|
||||
// { "1", CommonBoolCue.Digit1 },
|
||||
// { "2", CommonBoolCue.Digit2 },
|
||||
// { "3", CommonBoolCue.Digit3 },
|
||||
// { "4", CommonBoolCue.Digit4 },
|
||||
// { "5", CommonBoolCue.Digit5 },
|
||||
// { "6", CommonBoolCue.Digit6 },
|
||||
// { "7", CommonBoolCue.Digit7 },
|
||||
// { "8", CommonBoolCue.Digit8 },
|
||||
// { "9", CommonBoolCue.Digit9 },
|
||||
// { "Misc_1", Misc_1Function },
|
||||
// { "Misc_2", Misc_2Function },
|
||||
// };
|
||||
// LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state);
|
||||
//}
|
||||
|
||||
//public static void LinkDpadWithUserObjects(BasicTriListWithSmartObject triList,
|
||||
// uint smartObjectId, List<CueActionPair> deviceUserObjects, bool state)
|
||||
//{
|
||||
// var sigDict = new Dictionary<string, Cue>
|
||||
// {
|
||||
// { "Up", CommonBoolCue.Up },
|
||||
// { "Down", CommonBoolCue.Down },
|
||||
// { "Left", CommonBoolCue.Left },
|
||||
// { "Right", CommonBoolCue.Right },
|
||||
// { "OK", CommonBoolCue.Select },
|
||||
// };
|
||||
// LinkSmartObjectWithUserObjects(triList, smartObjectId, deviceUserObjects, sigDict, state);
|
||||
//}
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// MOVE TO HELPER CLASS
|
||||
///// </summary>
|
||||
///// <param name="triList"></param>
|
||||
///// <param name="smartObjectId"></param>
|
||||
///// <param name="deviceUserObjects"></param>
|
||||
///// <param name="smartObjectSigMap"></param>
|
||||
///// <param name="state"></param>
|
||||
//public static void LinkSmartObjectWithUserObjects(BasicTriListWithSmartObject triList,
|
||||
// uint smartObjectId, List<CueActionPair> deviceUserObjects, Dictionary<string, Cue> smartObjectSigMap, bool state)
|
||||
//{
|
||||
// // Hook up smart objects if applicable
|
||||
// if (triList.SmartObjects.Contains(smartObjectId))
|
||||
// {
|
||||
// var smartObject = triList.SmartObjects[smartObjectId];
|
||||
// foreach (var kvp in smartObjectSigMap)
|
||||
// {
|
||||
// if (smartObject.BooleanOutput.Contains(kvp.Key))
|
||||
// {
|
||||
// if (state)
|
||||
// {
|
||||
// // look for a user object and if so, attach/detach it to/from the sig.
|
||||
// var uo = deviceUserObjects.FirstOrDefault(ao => ao.Cue == kvp.Value);
|
||||
// if (uo != null)
|
||||
// smartObject.BooleanOutput[kvp.Key].UserObject = uo;
|
||||
// }
|
||||
// else
|
||||
// smartObject.BooleanOutput[kvp.Key].UserObject = null;
|
||||
// }
|
||||
// else
|
||||
// Debug.Console(0, "Smart object {0} does not contain Sig {1}", smartObject.ID, kvp.Key);
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// Debug.Console(0, "ERROR Smart object {0} not found on {1:X2}", smartObjectId, triList.ID);
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -1,275 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
//using PepperDash.Core;
|
||||
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public class LargeTouchpanelControllerBase : SmartGraphicsTouchpanelControllerBase
|
||||
// {
|
||||
// public string PresentationShareButtonInVideoText = "Share";
|
||||
// public string PresentationShareButtonNotInVideoText = "Presentation";
|
||||
|
||||
// SourceListSubpageReferenceList SourceSelectSRL;
|
||||
// DevicePageControllerBase CurrentPresentationSourcePageController;
|
||||
|
||||
// public LargeTouchpanelControllerBase(string key, string name,
|
||||
// BasicTriListWithSmartObject triList, string sgdFilePath)
|
||||
// : base(key, name, triList, sgdFilePath)
|
||||
// {
|
||||
// }
|
||||
|
||||
// public override bool CustomActivate()
|
||||
// {
|
||||
// var baseSuccess = base.CustomActivate();
|
||||
// if (!baseSuccess) return false;
|
||||
|
||||
// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n =>
|
||||
// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); });
|
||||
|
||||
// var lm = Global.LicenseManager;
|
||||
// if (lm != null)
|
||||
// {
|
||||
// lm.LicenseIsValid.LinkInputSig(TriList.BooleanInput[UiCue.ShowLicensed.Number]);
|
||||
// //others
|
||||
// }
|
||||
|
||||
// // Temp things -----------------------------------------------------------------------
|
||||
// TriList.StringInput[UiCue.SplashMessage.Number].StringValue = SplashMessage;
|
||||
// //------------------------------------------------------------------------------------
|
||||
|
||||
// // Initialize initial view
|
||||
// ShowSplashOrMain();
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// In Essentials, this should NEVER be called, since it's a one-room solution
|
||||
// /// </summary>
|
||||
// protected override void HideRoomUI()
|
||||
// {
|
||||
// // UI Cleanup here????
|
||||
|
||||
// //SwapAudioDeviceControls(CurrentRoom.CurrentAudioDevice, null);
|
||||
// //CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
|
||||
|
||||
// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
|
||||
// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
|
||||
|
||||
// SourceSelectSRL.DetachFromCurrentRoom();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Ties this panel controller to the Room and gets updates.
|
||||
// /// </summary>
|
||||
// protected override void ShowRoomUI()
|
||||
// {
|
||||
// Debug.Console(1, this, "connecting to system '{0}'", CurrentRoom.Key);
|
||||
|
||||
// TriList.StringInput[RoomCue.Name.Number].StringValue = CurrentRoom.Name;
|
||||
// TriList.StringInput[RoomCue.Description.Number].StringValue = CurrentRoom.Description;
|
||||
|
||||
// CurrentRoom.IsCoolingDown.OutputChange -= CurrentRoom_IsCoolingDown_OutputChange;
|
||||
// CurrentRoom.IsWarmingUp.OutputChange -= CurrentRoom_IsWarmingUp_OutputChange;
|
||||
// CurrentRoom.IsCoolingDown.OutputChange += CurrentRoom_IsCoolingDown_OutputChange;
|
||||
// CurrentRoom.IsWarmingUp.OutputChange += CurrentRoom_IsWarmingUp_OutputChange;
|
||||
|
||||
// SourceSelectSRL.AttachToRoom(CurrentRoom);
|
||||
// }
|
||||
|
||||
// void CurrentRoom_IsCoolingDown_OutputChange(object sender, EventArgs e)
|
||||
// {
|
||||
// Debug.Console(2, this, "Received room in cooldown={0}", CurrentRoom.IsCoolingDown.BoolValue);
|
||||
// if (CurrentRoom.IsCoolingDown.BoolValue) // When entering cooldown
|
||||
// {
|
||||
// // Do we need to check for an already-running cooldown - like in the case of room switches?
|
||||
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power Off", "Power", "Please wait, shutting down",
|
||||
// "", "", CurrentRoom.CooldownTime, true, b =>
|
||||
// {
|
||||
// ShowSplashOrMain();
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// void CurrentRoom_IsWarmingUp_OutputChange(object sender, EventArgs e)
|
||||
// {
|
||||
// Debug.Console(2, this, "Received room in warmup={0}", CurrentRoom.IsWarmingUp.BoolValue);
|
||||
// if (CurrentRoom.IsWarmingUp.BoolValue) // When entering warmup
|
||||
// {
|
||||
// // Do we need to check for an already-running cooldown - like in the case of room switches?
|
||||
// new ModalDialog(TriList).PresentModalTimerDialog(0, "Power On", "Power", "Please wait, powering on",
|
||||
// "", "", CurrentRoom.WarmupTime, false, b =>
|
||||
// {
|
||||
// // Reveal sources - or has already been done behind modal
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
|
||||
// // Handler for source change events.
|
||||
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
|
||||
// {
|
||||
// // Put away the old source and set up the new source.
|
||||
// Debug.Console(2, this, "Received source change={0}", args.NewSource != null ? args.NewSource.Key : "none");
|
||||
|
||||
// // If we're in tech, don't switch screen modes. Add any other modes we may want to switch away from
|
||||
// // inside the if below.
|
||||
// if (MainMode == eMainModeType.Splash)
|
||||
// setMainMode(eMainModeType.Presentation);
|
||||
// SetControlSource(args.NewSource);
|
||||
// }
|
||||
|
||||
// //***********************************************************************
|
||||
// //** UI Manipulation
|
||||
// //***********************************************************************
|
||||
|
||||
// /// <summary>
|
||||
// /// Shows the splash page or the main presentation page, depending on config setting
|
||||
// /// </summary>
|
||||
// void ShowSplashOrMain()
|
||||
// {
|
||||
// if (UsesSplashPage)
|
||||
// setMainMode(eMainModeType.Splash);
|
||||
// else
|
||||
// setMainMode(eMainModeType.Presentation);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Switches between main modes
|
||||
// /// </summary>
|
||||
// void setMainMode(eMainModeType mode)
|
||||
// {
|
||||
// MainMode = mode;
|
||||
// switch (mode)
|
||||
// {
|
||||
// case eMainModeType.Presentation:
|
||||
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = true;
|
||||
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = true;
|
||||
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = false;
|
||||
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = true;
|
||||
// ShowCurrentPresentationSourceUi();
|
||||
// break;
|
||||
// case eMainModeType.Splash:
|
||||
// TriList.BooleanInput[UiCue.VisibleCommonFooter.Number].BoolValue = false;
|
||||
// TriList.BooleanInput[UiCue.VisibleCommonHeader.Number].BoolValue = false;
|
||||
// TriList.BooleanInput[UiCue.VisiblePresentationSourceList.Number].BoolValue = false;
|
||||
// TriList.BooleanInput[UiCue.VisibleSplash.Number].BoolValue = true;
|
||||
// HideCurrentPresentationSourceUi();
|
||||
// break;
|
||||
// case eMainModeType.Tech:
|
||||
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Tech page", "Info",
|
||||
// "Tech page will be here soon!<br>I promise",
|
||||
// "Bueno!", "", 0, false, null);
|
||||
// MainMode = eMainModeType.Presentation;
|
||||
// break;
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
// void PowerOffWithConfirmPressed()
|
||||
// {
|
||||
// if (!CurrentRoom.RoomIsOn.BoolValue) return;
|
||||
// // Timeout or button 1 press will shut down
|
||||
// var modal = new ModalDialog(TriList);
|
||||
// uint seconds = CurrentRoom.UnattendedShutdownTimeMs / 1000;
|
||||
// var message = string.Format("Meeting will end in {0} seconds", seconds);
|
||||
// modal.PresentModalTimerDialog(2, "End Meeting", "Info", message,
|
||||
// "End Meeting Now", "Cancel", CurrentRoom.UnattendedShutdownTimeMs, true,
|
||||
// but => { if (but != 2) CurrentRoom.RoomOff(); });
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Reveals the basic UI for the current device
|
||||
// /// </summary>
|
||||
// protected override void ShowCurrentPresentationSourceUi()
|
||||
// {
|
||||
// if (MainMode == eMainModeType.Splash && CurrentRoom.RoomIsOn.BoolValue)
|
||||
// setMainMode(eMainModeType.Presentation);
|
||||
|
||||
// if (CurrentPresentationControlDevice == null)
|
||||
// {
|
||||
// // If system is off, do one thing
|
||||
|
||||
// // Otherwise, do something else - shouldn't be in this condition
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
// // If a controller is already loaded, use it
|
||||
// if (LoadedPageControllers.ContainsKey(CurrentPresentationControlDevice))
|
||||
// CurrentPresentationSourcePageController = LoadedPageControllers[CurrentPresentationControlDevice];
|
||||
// else
|
||||
// {
|
||||
// // This is by no means optimal, but for now....
|
||||
// if (CurrentPresentationControlDevice.Type == PresentationSourceType.SetTopBox
|
||||
// && CurrentPresentationControlDevice is IHasSetTopBoxProperties)
|
||||
// CurrentPresentationSourcePageController = new PageControllerLargeSetTopBoxGeneric(TriList,
|
||||
// CurrentPresentationControlDevice as IHasSetTopBoxProperties);
|
||||
|
||||
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Laptop)
|
||||
// CurrentPresentationSourcePageController = new PageControllerLaptop(TriList);
|
||||
|
||||
// // separate these...
|
||||
// else if (CurrentPresentationControlDevice.Type == PresentationSourceType.Dvd)
|
||||
// CurrentPresentationSourcePageController =
|
||||
// new PageControllerLargeDvd(TriList, CurrentPresentationControlDevice as IHasCueActionList);
|
||||
|
||||
// else
|
||||
// CurrentPresentationSourcePageController = null;
|
||||
|
||||
// // Save it.
|
||||
// if (CurrentPresentationSourcePageController != null)
|
||||
// LoadedPageControllers[CurrentPresentationControlDevice] = CurrentPresentationSourcePageController;
|
||||
// }
|
||||
|
||||
// if (CurrentPresentationSourcePageController != null)
|
||||
// CurrentPresentationSourcePageController.SetVisible(true);
|
||||
// }
|
||||
|
||||
// protected override void HideCurrentPresentationSourceUi()
|
||||
// {
|
||||
// if (CurrentPresentationControlDevice != null && CurrentPresentationSourcePageController != null)
|
||||
// CurrentPresentationSourcePageController.SetVisible(false);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// void ShowHelp()
|
||||
// {
|
||||
// new ModalDialog(TriList).PresentModalTimerDialog(1, "Help", "Help", CurrentRoom.HelpMessage,
|
||||
// "OK", "", 0, false, null);
|
||||
// }
|
||||
|
||||
// protected void ListSmartObjects()
|
||||
// {
|
||||
// Debug.Console(0, this, "Smart objects IDs:");
|
||||
// var list = TriList.SmartObjects.OrderBy(s => s.Key);
|
||||
// foreach (var kvp in list)
|
||||
// Debug.Console(0, " {0}", kvp.Key);
|
||||
// }
|
||||
|
||||
// public override List<CueActionPair> FunctionList
|
||||
// {
|
||||
// get
|
||||
// {
|
||||
// return new List<CueActionPair>
|
||||
// {
|
||||
// new BoolCueActionPair(UiCue.PressSplash, b => { if(!b) setMainMode(eMainModeType.Presentation); }),
|
||||
// new BoolCueActionPair(UiCue.PressRoomOffWithConfirm, b => { if(!b) PowerOffWithConfirmPressed(); }),
|
||||
// new BoolCueActionPair(UiCue.PressModePresentationShare, b => { if(!b) setMainMode(eMainModeType.Presentation); }),
|
||||
// new BoolCueActionPair(UiCue.PressHelp, b => { if(!b) ShowHelp(); }),
|
||||
// new BoolCueActionPair(UiCue.PressSettings, b => { if(!b) setMainMode(eMainModeType.Tech); }),
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
// //#endregion
|
||||
// }
|
||||
//}
|
||||
@@ -1,244 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using System.Text;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
//using PepperDash.Essentials.Core.Presets;
|
||||
|
||||
//using PepperDash.Core;
|
||||
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// public abstract class DevicePageControllerBase
|
||||
// {
|
||||
|
||||
// protected BasicTriListWithSmartObject TriList;
|
||||
// protected List<BoolInputSig> FixedObjectSigs;
|
||||
|
||||
// public DevicePageControllerBase(BasicTriListWithSmartObject triList)
|
||||
// {
|
||||
// TriList = triList;
|
||||
// }
|
||||
|
||||
// public void SetVisible(bool state)
|
||||
// {
|
||||
// foreach (var sig in FixedObjectSigs)
|
||||
// {
|
||||
// Debug.Console(2, "set visible {0}={1}", sig.Number, state);
|
||||
// sig.BoolValue = state;
|
||||
// }
|
||||
// CustomSetVisible(state);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Add any specialized show/hide logic here - beyond FixedObjectSigs. Overriding
|
||||
// /// methods do not need to call this base method
|
||||
// /// </summary>
|
||||
// protected virtual void CustomSetVisible(bool state)
|
||||
// {
|
||||
// }
|
||||
// }
|
||||
|
||||
// //public class InterlockedDevicePageController
|
||||
// //{
|
||||
// // public List<uint> ObjectBoolJoins { get; set; }
|
||||
// // public uint DefaultJoin { get; set; }
|
||||
// //}
|
||||
|
||||
|
||||
|
||||
|
||||
// ///// <summary>
|
||||
// /////
|
||||
// ///// </summary>
|
||||
// //public interface IHasSetTopBoxProperties
|
||||
// //{
|
||||
// // bool HasDpad { get; }
|
||||
// // bool HasPreset { get; }
|
||||
// // bool HasDvr { get; }
|
||||
// // bool HasNumbers { get; }
|
||||
// // DevicePresetsModel PresetsModel { get; }
|
||||
// // void LoadPresets(string filePath);
|
||||
// //}
|
||||
|
||||
// public class PageControllerLaptop : DevicePageControllerBase
|
||||
// {
|
||||
// public PageControllerLaptop(BasicTriListWithSmartObject tl)
|
||||
// : base(tl)
|
||||
// {
|
||||
// FixedObjectSigs = new List<BoolInputSig>
|
||||
// {
|
||||
// tl.BooleanInput[10092], // well
|
||||
// tl.BooleanInput[11001] // Laptop info
|
||||
// };
|
||||
// }
|
||||
// }
|
||||
|
||||
// ///// <summary>
|
||||
// /////
|
||||
// ///// </summary>
|
||||
// //public class PageControllerLargeDvd : DevicePageControllerBase
|
||||
// //{
|
||||
// // IHasCueActionList Device;
|
||||
|
||||
// // public PageControllerLargeDvd(BasicTriListWithSmartObject tl, IHasCueActionList device)
|
||||
// // : base(tl)
|
||||
// // {
|
||||
|
||||
// // Device = device;
|
||||
// // FixedObjectSigs = new List<BoolInputSig>
|
||||
// // {
|
||||
// // tl.BooleanInput[10093], // well
|
||||
// // tl.BooleanInput[10411], // DVD Dpad
|
||||
// // tl.BooleanInput[10412] // everything else
|
||||
// // };
|
||||
// // }
|
||||
|
||||
// // protected override void CustomSetVisible(bool state)
|
||||
// // {
|
||||
// // // Hook up smart objects if applicable
|
||||
// // if (Device != null)
|
||||
// // {
|
||||
// // var uos = (Device as IHasCueActionList).CueActionList;
|
||||
// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, 10411, uos, state);
|
||||
// // }
|
||||
// // }
|
||||
// //}
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// //public class PageControllerLargeSetTopBoxGeneric : DevicePageControllerBase
|
||||
// //{
|
||||
// // // To-DO: Add properties for component subpage names. DpadPos1, DpadPos2...
|
||||
// // // Derived classes can then insert special subpages for variations on given
|
||||
// // // device types. Like DirecTV vs Comcast
|
||||
|
||||
// // public uint DpadSmartObjectId { get; set; }
|
||||
// // public uint NumberPadSmartObjectId { get; set; }
|
||||
// // public uint PresetsSmartObjectId { get; set; }
|
||||
// // public uint Position5TabsId { get; set; }
|
||||
|
||||
// // IHasSetTopBoxProperties Device;
|
||||
// // DevicePresetsView PresetsView;
|
||||
|
||||
|
||||
// // bool ShowPosition5Tabs;
|
||||
// // uint CurrentVisiblePosition5Item = 1;
|
||||
// // Dictionary<uint, uint> Position5SubpageJoins = new Dictionary<uint, uint>
|
||||
// // {
|
||||
// // { 1, 10053 },
|
||||
// // { 2, 10054 }
|
||||
// // };
|
||||
|
||||
// // public PageControllerLargeSetTopBoxGeneric(BasicTriListWithSmartObject tl, IHasSetTopBoxProperties device)
|
||||
// // : base(tl)
|
||||
// // {
|
||||
// // Device = device;
|
||||
// // DpadSmartObjectId = 10011;
|
||||
// // NumberPadSmartObjectId = 10014;
|
||||
// // PresetsSmartObjectId = 10012;
|
||||
// // Position5TabsId = 10081;
|
||||
|
||||
// // bool dpad = device.HasDpad;
|
||||
// // bool preset = device.HasPreset;
|
||||
// // bool dvr = device.HasDvr;
|
||||
// // bool numbers = device.HasNumbers;
|
||||
// // uint[] joins = null;
|
||||
|
||||
// // if (dpad && !preset && !dvr && !numbers) joins = new uint[] { 10031, 10091 };
|
||||
// // else if (!dpad && preset && !dvr && !numbers) joins = new uint[] { 10032, 10091 };
|
||||
// // else if (!dpad && !preset && dvr && !numbers) joins = new uint[] { 10033, 10091 };
|
||||
// // else if (!dpad && !preset && !dvr && numbers) joins = new uint[] { 10034, 10091 };
|
||||
|
||||
// // else if (dpad && preset && !dvr && !numbers) joins = new uint[] { 10042, 10021, 10092 };
|
||||
// // else if (dpad && !preset && dvr && !numbers) joins = new uint[] { 10043, 10021, 10092 };
|
||||
// // else if (dpad && !preset && !dvr && numbers) joins = new uint[] { 10044, 10021, 10092 };
|
||||
// // else if (!dpad && preset && dvr && !numbers) joins = new uint[] { 10043, 10022, 10092 };
|
||||
// // else if (!dpad && preset && !dvr && numbers) joins = new uint[] { 10044, 10022, 10092 };
|
||||
// // else if (!dpad && !preset && dvr && numbers) joins = new uint[] { 10044, 10023, 10092 };
|
||||
|
||||
// // else if (dpad && preset && dvr && !numbers) joins = new uint[] { 10053, 10032, 10011, 10093 };
|
||||
// // else if (dpad && preset && !dvr && numbers) joins = new uint[] { 10054, 10032, 10011, 10093 };
|
||||
// // else if (dpad && !preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10011, 10093 };
|
||||
// // else if (!dpad && preset && dvr && numbers) joins = new uint[] { 10054, 10033, 10012, 10093 };
|
||||
|
||||
// // else if (dpad && preset && dvr && numbers)
|
||||
// // {
|
||||
// // joins = new uint[] { 10081, 10032, 10011, 10093 }; // special case
|
||||
// // ShowPosition5Tabs = true;
|
||||
// // }
|
||||
// // // Project the joins into corresponding sigs.
|
||||
// // FixedObjectSigs = joins.Select(u => TriList.BooleanInput[u]).ToList();
|
||||
|
||||
// // // Build presets
|
||||
// // if (device.HasPreset)
|
||||
// // {
|
||||
// // PresetsView = new DevicePresetsView(tl, device.PresetsModel);
|
||||
// // }
|
||||
|
||||
|
||||
// // }
|
||||
|
||||
// // protected override void CustomSetVisible(bool state)
|
||||
// // {
|
||||
// // if (ShowPosition5Tabs)
|
||||
// // {
|
||||
// // // Show selected tab
|
||||
// // TriList.BooleanInput[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = state;
|
||||
|
||||
// // var tabSo = TriList.SmartObjects[Position5TabsId];
|
||||
// // if (state) // Link up the tab object
|
||||
|
||||
// // {
|
||||
// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = new BoolCueActionPair(b => ShowTab(1));
|
||||
// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = new BoolCueActionPair(b => ShowTab(2));
|
||||
// // }
|
||||
// // else // Disco tab object
|
||||
// // {
|
||||
// // tabSo.BooleanOutput["Tab Button 1 Press"].UserObject = null;
|
||||
// // tabSo.BooleanOutput["Tab Button 2 Press"].UserObject = null;
|
||||
// // }
|
||||
// // }
|
||||
|
||||
// // // Hook up smart objects if applicable
|
||||
// // if (Device is IHasCueActionList)
|
||||
// // {
|
||||
// // var uos = (Device as IHasCueActionList).CueActionList;
|
||||
// // SmartObjectHelper.LinkDpadWithUserObjects(TriList, DpadSmartObjectId, uos, state);
|
||||
// // SmartObjectHelper.LinkNumpadWithUserObjects(TriList, NumberPadSmartObjectId,
|
||||
// // uos, CommonBoolCue.Dash, CommonBoolCue.Last, state);
|
||||
// // }
|
||||
|
||||
|
||||
// // // Link, unlink presets
|
||||
// // if (Device.HasPreset && state)
|
||||
// // PresetsView.Attach();
|
||||
// // else if (Device.HasPreset && !state)
|
||||
// // PresetsView.Detach();
|
||||
// // }
|
||||
|
||||
// // void ShowTab(uint number)
|
||||
// // {
|
||||
// // // Ignore re-presses
|
||||
// // if (CurrentVisiblePosition5Item == number) return;
|
||||
// // // Swap subpage
|
||||
// // var bi = TriList.BooleanInput;
|
||||
// // if(CurrentVisiblePosition5Item > 0)
|
||||
// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = false;
|
||||
// // CurrentVisiblePosition5Item = number;
|
||||
// // bi[Position5SubpageJoins[CurrentVisiblePosition5Item]].BoolValue = true;
|
||||
|
||||
// // // Show feedback on buttons
|
||||
// // }
|
||||
|
||||
// //}
|
||||
//}
|
||||
@@ -1,135 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
//using Crestron.SimplSharpPro.UI;
|
||||
|
||||
//using PepperDash.Core;
|
||||
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
//[Obsolete("Replaced, initially with CrestronTsr302Controller in Resissentials")]
|
||||
// public class Tsr302Controller : SmartGraphicsTouchpanelControllerBase
|
||||
// {
|
||||
// //public override List<CueActionPair> FunctionList
|
||||
// //{
|
||||
// // get
|
||||
// // {
|
||||
// // return new List<CueActionPair>
|
||||
// // {
|
||||
|
||||
// // };
|
||||
// // }
|
||||
// //}
|
||||
|
||||
// public Tsr302 Remote { get; private set; }
|
||||
|
||||
// SourceListSubpageReferenceList SourceSelectSRL;
|
||||
// DevicePageControllerBase CurrentPresentationSourcePageController;
|
||||
// CTimer VolumeFeedbackTimer;
|
||||
|
||||
|
||||
// public Tsr302Controller(string key, string name, Tsr302 device, string sgdFilePath) :
|
||||
// base(key, name, device, sgdFilePath)
|
||||
// {
|
||||
// // Base takes care of TriList
|
||||
// Remote = device;
|
||||
// Remote.Home.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); });
|
||||
// Remote.VolumeUp.UserObject = new BoolCueActionPair(b => { if (!b) PressHome(); });
|
||||
// Remote.ButtonStateChange += Remote_ButtonStateChange;
|
||||
// }
|
||||
|
||||
// public override bool CustomActivate()
|
||||
// {
|
||||
// var baseSuccess = base.CustomActivate();
|
||||
// if (!baseSuccess) return false;
|
||||
|
||||
// SourceSelectSRL = new SourceListSubpageReferenceList(this.TriList, n =>
|
||||
// { if (CurrentRoom != null) CurrentRoom.SelectSource(n); });
|
||||
|
||||
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// protected override void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev)
|
||||
// {
|
||||
// // stop presses
|
||||
// if (oldDev != null)
|
||||
// {
|
||||
// ReleaseAudioPresses();
|
||||
// if (oldDev is IVolumeTwoWay)
|
||||
// {
|
||||
// (newDev as IVolumeTwoWay).VolumeLevelFeedback.OutputChange -= VolumeLevelOutput_OutputChange;
|
||||
// (oldDev as IVolumeTwoWay).VolumeLevelFeedback
|
||||
// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
|
||||
// }
|
||||
// }
|
||||
|
||||
// if (newDev != null)
|
||||
// {
|
||||
// Remote.VolumeDown.UserObject = newDev.VolumeDownCueActionPair;
|
||||
// Remote.VolumeUp.UserObject = newDev.VolumeUpCueActionPair;
|
||||
// Remote.Mute.UserObject = newDev.MuteToggleCueActionPair;
|
||||
// if (newDev is IVolumeTwoWay)
|
||||
// {
|
||||
// var vOut = (newDev as IVolumeTwoWay).VolumeLevelFeedback;
|
||||
// vOut.OutputChange += VolumeLevelOutput_OutputChange;
|
||||
// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue = vOut.UShortValue;
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Remote.VolumeDown.UserObject = null;
|
||||
// Remote.VolumeUp.UserObject = null;
|
||||
// Remote.Mute.UserObject = null;
|
||||
// }
|
||||
|
||||
// base.SwapAudioDeviceControls(oldDev, newDev);
|
||||
// }
|
||||
|
||||
// void PressHome()
|
||||
// {
|
||||
|
||||
// }
|
||||
|
||||
// void VolumeLevelOutput_OutputChange(object sender, EventArgs e)
|
||||
// {
|
||||
// // Set level and show popup on timer
|
||||
// TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number].UShortValue =
|
||||
// (sender as IntFeedback).UShortValue;
|
||||
|
||||
// if (VolumeFeedbackTimer == null)
|
||||
// {
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
|
||||
// VolumeFeedbackTimer = new CTimer(o => {
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false;
|
||||
// }, 1000);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// void ReleaseAudioPresses()
|
||||
// {
|
||||
// if (Remote.VolumeDown.UserObject is BoolCueActionPair && Remote.VolumeDown.State == eButtonState.Pressed)
|
||||
// (Remote.VolumeDown.UserObject as BoolCueActionPair).Invoke(false);
|
||||
// if (Remote.VolumeUp.UserObject is BoolCueActionPair && Remote.VolumeUp.State == eButtonState.Pressed)
|
||||
// (Remote.VolumeUp.UserObject as BoolCueActionPair).Invoke(false);
|
||||
// if (Remote.Mute.UserObject is BoolCueActionPair && Remote.Mute.State == eButtonState.Pressed)
|
||||
// (Remote.Mute.UserObject as BoolCueActionPair).Invoke(false);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Handler. Run UO's stored in buttons
|
||||
// /// </summary>
|
||||
// void Remote_ButtonStateChange(GenericBase device, ButtonEventArgs args)
|
||||
// {
|
||||
// Debug.Console(2, this, "{0}={1}", args.Button.Name, args.Button.State);
|
||||
// var uo = args.Button.UserObject as BoolCueActionPair;
|
||||
// if (uo != null)
|
||||
// uo.Invoke(args.NewButtonState == eButtonState.Pressed);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -1,309 +0,0 @@
|
||||
//using System;
|
||||
//using System.Collections.Generic;
|
||||
//using System.Linq;
|
||||
//using Crestron.SimplSharp;
|
||||
//using Crestron.SimplSharpPro;
|
||||
//using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
|
||||
//namespace PepperDash.Essentials.Core
|
||||
//{
|
||||
// public abstract class SmartGraphicsTouchpanelControllerBase : CrestronGenericBaseDevice
|
||||
// {
|
||||
// public BasicTriListWithSmartObject TriList { get; protected set; }
|
||||
// public bool UsesSplashPage { get; set; }
|
||||
// public string SplashMessage { get; set; }
|
||||
// public bool ShowDate
|
||||
// {
|
||||
// set { TriList.BooleanInput[UiCue.ShowDate.Number].BoolValue = value; }
|
||||
// }
|
||||
// public bool ShowTime
|
||||
// {
|
||||
// set { TriList.BooleanInput[UiCue.ShowTime.Number].BoolValue = value; }
|
||||
// }
|
||||
|
||||
// public abstract List<CueActionPair> FunctionList { get; }
|
||||
|
||||
|
||||
// protected eMainModeType MainMode;
|
||||
// protected IPresentationSource CurrentPresentationControlDevice;
|
||||
|
||||
// /// <summary>
|
||||
// /// Defines the signal offset for the presentation device. Defaults to 100
|
||||
// /// </summary>
|
||||
// public uint PresentationControlDeviceJoinOffset { get { return 100; } }
|
||||
|
||||
// public enum eMainModeType
|
||||
// {
|
||||
// Presentation, Splash, Tech
|
||||
// }
|
||||
|
||||
// protected string SgdFilePath;
|
||||
// public EssentialsRoom CurrentRoom { get; protected set; }
|
||||
// protected Dictionary<IPresentationSource, DevicePageControllerBase> LoadedPageControllers
|
||||
// = new Dictionary<IPresentationSource, DevicePageControllerBase>();
|
||||
|
||||
// static object RoomChangeLock = new object();
|
||||
|
||||
// /// <summary>
|
||||
// /// Constructor
|
||||
// /// </summary>
|
||||
// public SmartGraphicsTouchpanelControllerBase(string key, string name, BasicTriListWithSmartObject triList,
|
||||
// string sgdFilePath)
|
||||
// : base(key, name, triList)
|
||||
// {
|
||||
// TriList = triList;
|
||||
// if (string.IsNullOrEmpty(key)) throw new ArgumentNullException("key");
|
||||
// if (string.IsNullOrEmpty(sgdFilePath)) throw new ArgumentNullException("sgdFilePath");
|
||||
// SgdFilePath = sgdFilePath;
|
||||
// TriList.LoadSmartObjects(SgdFilePath);
|
||||
// UsesSplashPage = true;
|
||||
// SplashMessage = "Welcome";
|
||||
// TriList.SigChange += Tsw_AnySigChange;
|
||||
// foreach (var kvp in TriList.SmartObjects)
|
||||
// kvp.Value.SigChange += this.Tsw_AnySigChange;
|
||||
// }
|
||||
|
||||
// public override bool CustomActivate()
|
||||
// {
|
||||
// var baseSuccess = base.CustomActivate();
|
||||
// if (!baseSuccess) return false;
|
||||
|
||||
// // Wiring up the buttons with UOs
|
||||
// foreach (var uo in this.FunctionList)
|
||||
// {
|
||||
// if (uo.Cue.Number == 0) continue;
|
||||
// if (uo is BoolCueActionPair)
|
||||
// TriList.BooleanOutput[uo.Cue.Number].UserObject = uo;
|
||||
// else if (uo is UShortCueActionPair)
|
||||
// TriList.UShortOutput[uo.Cue.Number].UserObject = uo;
|
||||
// else if (uo is StringCueActionPair)
|
||||
// TriList.StringOutput[uo.Cue.Number].UserObject = uo;
|
||||
// }
|
||||
|
||||
// return true;
|
||||
// }
|
||||
|
||||
// //public void SetCurrentRoom(EssentialsRoom room)
|
||||
// //{
|
||||
// // if (CurrentRoom != null)
|
||||
// // HideRoomUI();
|
||||
// // CurrentRoom = room;
|
||||
// // ShowRoomUI();
|
||||
// //}
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// /// <param name="room"></param>
|
||||
// public void SetCurrentRoom(EssentialsRoom room)
|
||||
// {
|
||||
// if (CurrentRoom == room) return;
|
||||
|
||||
// IVolumeFunctions oldAudio = null;
|
||||
// //Disconnect current room and audio device
|
||||
// if (CurrentRoom != null)
|
||||
// {
|
||||
// HideRoomUI();
|
||||
// CurrentRoom.AudioDeviceWillChange -= CurrentRoom_AudioDeviceWillChange;
|
||||
// CurrentRoom.PresentationSourceChange -= CurrentRoom_PresentationSourceChange;
|
||||
// oldAudio = CurrentRoom.CurrentAudioDevice;
|
||||
// }
|
||||
|
||||
// CurrentRoom = room;
|
||||
// IVolumeFunctions newAudio = null;
|
||||
// if (CurrentRoom != null)
|
||||
// {
|
||||
// CurrentRoom.AudioDeviceWillChange += this.CurrentRoom_AudioDeviceWillChange;
|
||||
// CurrentRoom.PresentationSourceChange += this.CurrentRoom_PresentationSourceChange;
|
||||
// SetControlSource(CurrentRoom.CurrentPresentationSource);
|
||||
// newAudio = CurrentRoom.CurrentAudioDevice;
|
||||
// ShowRoomUI();
|
||||
// }
|
||||
|
||||
// SwapAudioDeviceControls(oldAudio, newAudio);
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Detaches and attaches an IVolumeFunctions device to the appropriate TP TriList signals.
|
||||
// /// This will also add IVolumeNumeric if the device implements it.
|
||||
// /// Overriding classes should call this. Overriding classes are responsible for
|
||||
// /// linking up to hard keys, etc.
|
||||
// /// </summary>
|
||||
// /// <param name="oldDev">May be null</param>
|
||||
// /// <param name="newDev">May be null</param>
|
||||
// protected virtual void SwapAudioDeviceControls(IVolumeFunctions oldDev, IVolumeFunctions newDev)
|
||||
// {
|
||||
// // Disconnect
|
||||
// if (oldDev != null)
|
||||
// {
|
||||
// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = null;
|
||||
// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = null;
|
||||
// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = null;
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeButtons.Number].BoolValue = false;
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = false;
|
||||
// if (oldDev is IVolumeTwoWay)
|
||||
// {
|
||||
// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = null;
|
||||
// (oldDev as IVolumeTwoWay).IsMutedFeedback
|
||||
// .UnlinkInputSig(TriList.BooleanInput[CommonBoolCue.MuteOn.Number]);
|
||||
// (oldDev as IVolumeTwoWay).VolumeLevelFeedback
|
||||
// .UnlinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
|
||||
// }
|
||||
// }
|
||||
// if (newDev != null)
|
||||
// {
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
|
||||
// TriList.BooleanOutput[CommonBoolCue.VolumeDown.Number].UserObject = newDev.VolumeDownCueActionPair;
|
||||
// TriList.BooleanOutput[CommonBoolCue.VolumeUp.Number].UserObject = newDev.VolumeUpCueActionPair;
|
||||
// TriList.BooleanOutput[CommonBoolCue.MuteToggle.Number].UserObject = newDev.MuteToggleCueActionPair;
|
||||
// if (newDev is IVolumeTwoWay)
|
||||
// {
|
||||
// TriList.BooleanInput[CommonBoolCue.ShowVolumeSlider.Number].BoolValue = true;
|
||||
// var numDev = newDev as IVolumeTwoWay;
|
||||
// TriList.UShortOutput[CommonIntCue.MainVolumeLevel.Number].UserObject = numDev.VolumeLevelCueActionPair;
|
||||
// numDev.VolumeLevelFeedback
|
||||
// .LinkInputSig(TriList.UShortInput[CommonIntCue.MainVolumeLevel.Number]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
|
||||
// /// </summary>
|
||||
// protected virtual void HideRoomUI() { }
|
||||
|
||||
// /// <summary>
|
||||
// /// Does nothing. Override to add functionality when calling SetCurrentRoom
|
||||
// /// </summary>
|
||||
// protected virtual void ShowRoomUI() { }
|
||||
|
||||
// /// <summary>
|
||||
// /// Sets up the current presentation device and updates statuses if the device is capable.
|
||||
// /// </summary>
|
||||
// protected void SetControlSource(IPresentationSource newSource)
|
||||
// {
|
||||
// if (CurrentPresentationControlDevice != null)
|
||||
// {
|
||||
// HideCurrentPresentationSourceUi();
|
||||
|
||||
// // Unhook presses and things
|
||||
// if (CurrentPresentationControlDevice is IHasCueActionList)
|
||||
// {
|
||||
// foreach (var uo in (CurrentPresentationControlDevice as IHasCueActionList).CueActionList)
|
||||
// {
|
||||
// if (uo.Cue.Number == 0) continue;
|
||||
// if (uo is BoolCueActionPair)
|
||||
// {
|
||||
// var bSig = TriList.BooleanOutput[uo.Cue.Number];
|
||||
// // Disconnection should also clear bool sigs in case they are pressed and
|
||||
// // might be orphaned
|
||||
// if (bSig.BoolValue)
|
||||
// (bSig.UserObject as BoolCueActionPair).Invoke(false);
|
||||
// bSig.UserObject = null;
|
||||
// }
|
||||
// else if (uo is UShortCueActionPair)
|
||||
// TriList.UShortOutput[uo.Cue.Number].UserObject = null;
|
||||
// else if (uo is StringCueActionPair)
|
||||
// TriList.StringOutput[uo.Cue.Number].UserObject = null;
|
||||
// }
|
||||
// }
|
||||
// // unhook outputs
|
||||
// if (CurrentPresentationControlDevice is IHasFeedback)
|
||||
// {
|
||||
// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
|
||||
// {
|
||||
// if (output.Cue.Number == 0) continue;
|
||||
// if (output is BoolFeedback)
|
||||
// (output as BoolFeedback).UnlinkInputSig(TriList.BooleanInput[output.Cue.Number]);
|
||||
// else if (output is IntFeedback)
|
||||
// (output as IntFeedback).UnlinkInputSig(TriList.UShortInput[output.Cue.Number]);
|
||||
// else if (output is StringFeedback)
|
||||
// (output as StringFeedback).UnlinkInputSig(TriList.StringInput[output.Cue.Number]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// CurrentPresentationControlDevice = newSource;
|
||||
// //connect presses and things
|
||||
// if (newSource is IHasCueActionList) // This has functions, get 'em
|
||||
// {
|
||||
// foreach (var ao in (newSource as IHasCueActionList).CueActionList)
|
||||
// {
|
||||
// if (ao.Cue.Number == 0) continue;
|
||||
// if (ao is BoolCueActionPair)
|
||||
// TriList.BooleanOutput[ao.Cue.Number].UserObject = ao;
|
||||
// else if (ao is UShortCueActionPair)
|
||||
// TriList.UShortOutput[ao.Cue.Number].UserObject = ao;
|
||||
// else if (ao is StringCueActionPair)
|
||||
// TriList.StringOutput[ao.Cue.Number].UserObject = ao;
|
||||
// }
|
||||
// }
|
||||
// // connect outputs (addInputSig should update sig)
|
||||
// if (CurrentPresentationControlDevice is IHasFeedback)
|
||||
// {
|
||||
// foreach (var output in (CurrentPresentationControlDevice as IHasFeedback).Feedbacks)
|
||||
// {
|
||||
// if (output.Cue.Number == 0) continue;
|
||||
// if (output is BoolFeedback)
|
||||
// (output as BoolFeedback).LinkInputSig(TriList.BooleanInput[output.Cue.Number]);
|
||||
// else if (output is IntFeedback)
|
||||
// (output as IntFeedback).LinkInputSig(TriList.UShortInput[output.Cue.Number]);
|
||||
// else if (output is StringFeedback)
|
||||
// (output as StringFeedback).LinkInputSig(TriList.StringInput[output.Cue.Number]);
|
||||
// }
|
||||
// }
|
||||
// ShowCurrentPresentationSourceUi();
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Reveals the basic UI for the current device
|
||||
// /// </summary>
|
||||
// protected virtual void ShowCurrentPresentationSourceUi()
|
||||
// {
|
||||
// }
|
||||
|
||||
// /// <summary>
|
||||
// /// Hides the UI for the current device and calls for a feedback signal cleanup
|
||||
// /// </summary>
|
||||
// protected virtual void HideCurrentPresentationSourceUi()
|
||||
// {
|
||||
// }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// void CurrentRoom_PresentationSourceChange(object sender, EssentialsRoomSourceChangeEventArgs args)
|
||||
// {
|
||||
// SetControlSource(args.NewSource);
|
||||
// }
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// ///
|
||||
// /// </summary>
|
||||
// void CurrentRoom_AudioDeviceWillChange(object sender, EssentialsRoomAudioDeviceChangeEventArgs e)
|
||||
// {
|
||||
// SwapAudioDeviceControls(e.OldDevice, e.NewDevice);
|
||||
// }
|
||||
|
||||
|
||||
|
||||
// /// <summary>
|
||||
// /// Panel event handler
|
||||
// /// </summary>
|
||||
// void Tsw_AnySigChange(object currentDevice, SigEventArgs args)
|
||||
// {
|
||||
// // plugged in commands
|
||||
// object uo = args.Sig.UserObject;
|
||||
|
||||
// if (uo is Action<bool>)
|
||||
// (uo as Action<bool>)(args.Sig.BoolValue);
|
||||
// else if (uo is Action<ushort>)
|
||||
// (uo as Action<ushort>)(args.Sig.UShortValue);
|
||||
// else if (uo is Action<string>)
|
||||
// (uo as Action<string>)(args.Sig.StringValue);
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
@@ -1,20 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Crestron.SimplSharp;
|
||||
using Crestron.SimplSharpPro;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
public static class VideoStatusCues
|
||||
{
|
||||
public static readonly Cue HasVideoStatusFeedback = Cue.BoolCue("HasVideoStatusFeedback", 1);
|
||||
public static readonly Cue VideoSyncFeedback = Cue.BoolCue("VideoSyncFeedback", 2);
|
||||
public static readonly Cue HdcpActiveFeedback = Cue.BoolCue("HdcpActiveFeedback", 3);
|
||||
public static readonly Cue HdcpStateFeedback = Cue.StringCue("HdcpStateFeedback", 3);
|
||||
public static readonly Cue VideoResolutionFeedback = Cue.StringCue("VideoResolutionFeedback", 2);
|
||||
public static readonly Cue VideoStatusDeviceKey = Cue.StringCue("VideoStatusDeviceKey", 0);
|
||||
public static readonly Cue VideoStatusDeviceName = Cue.StringCue("VideoStatusDeviceName", 4);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user