mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-05 15:55:02 +00:00
wip: update XML comments
This commit is contained in:
@@ -7,72 +7,93 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public class CrestronTouchpanelPropertiesConfig
|
||||
{
|
||||
[JsonProperty("control")]
|
||||
/// <summary>
|
||||
/// Gets or sets the ControlProperties
|
||||
/// </summary>
|
||||
[JsonProperty("control")]
|
||||
public EssentialsControlPropertiesConfig ControlProperties { get; set; }
|
||||
|
||||
[JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the IpId
|
||||
/// </summary>
|
||||
[JsonProperty("ipId", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string IpId { get; set; }
|
||||
|
||||
[JsonProperty("defaultRoomKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the DefaultRoomKey
|
||||
/// </summary>
|
||||
[JsonProperty("defaultRoomKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string DefaultRoomKey { get; set; }
|
||||
|
||||
[JsonProperty("roomListKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the RoomListKey
|
||||
/// </summary>
|
||||
[JsonProperty("roomListKey", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string RoomListKey { get; set; }
|
||||
|
||||
[JsonProperty("sgdFile", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the SgdFile
|
||||
/// </summary>
|
||||
[JsonProperty("sgdFile", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string SgdFile { get; set; }
|
||||
|
||||
[JsonProperty("projectName", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the ProjectName
|
||||
/// </summary>
|
||||
[JsonProperty("projectName", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string ProjectName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ShowVolumeGauge
|
||||
/// </summary>
|
||||
[JsonProperty("showVolumeGauge", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? ShowVolumeGauge { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the UsesSplashPage
|
||||
/// </summary>
|
||||
[JsonProperty("usesSplashPage", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? UsesSplashPage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ShowDate
|
||||
/// </summary>
|
||||
[JsonProperty("showDate", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? ShowDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ShowTime
|
||||
/// </summary>
|
||||
[JsonProperty("showTime", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? ShowTime { get; set; }
|
||||
|
||||
[JsonProperty("setup", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the Setup
|
||||
/// </summary>
|
||||
[JsonProperty("setup", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public UiSetupPropertiesConfig Setup { get; set; }
|
||||
|
||||
[JsonProperty("headerStyle", NullValueHandling = NullValueHandling.Ignore)]
|
||||
/// <summary>
|
||||
/// Gets or sets the HeaderStyle
|
||||
/// </summary>
|
||||
[JsonProperty("headerStyle", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string HeaderStyle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IncludeInFusionRoomHealth
|
||||
/// </summary>
|
||||
[JsonProperty("includeInFusionRoomHealth", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool? IncludeInFusionRoomHealth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ScreenSaverTimeoutMin
|
||||
/// </summary>
|
||||
[JsonProperty("screenSaverTimeoutMin", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public uint? ScreenSaverTimeoutMin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ScreenSaverMovePositionIntervalMs
|
||||
/// </summary>
|
||||
[JsonProperty("screenSaverMovePositionIntervalMs", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public uint? ScreenSaverMovePositionIntervalMs { get; set; }
|
||||
|
||||
@@ -84,8 +105,15 @@ namespace PepperDash.Essentials.Core
|
||||
[JsonProperty("sourcesOverflowCount", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int? SourcesOverflowCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public CrestronTouchpanelPropertiesConfig() : this(false) { }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="setDefaultValues">set values to default if true</param>
|
||||
public CrestronTouchpanelPropertiesConfig(bool setDefaultValues = false)
|
||||
{
|
||||
if(!setDefaultValues) { return; }
|
||||
@@ -112,6 +140,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public class UiSetupPropertiesConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the IsVisible
|
||||
/// </summary>
|
||||
[JsonProperty("isVisible", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool IsVisible { get; set; }
|
||||
}
|
||||
|
||||
@@ -12,6 +12,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
public interface IHasBasicTriListWithSmartObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the Panel
|
||||
/// </summary>
|
||||
BasicTriListWithSmartObject Panel { get; }
|
||||
}
|
||||
}
|
||||
@@ -27,8 +27,14 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
|
||||
/// </summary>
|
||||
public StringFeedback OutputFeedback { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the IsVisible
|
||||
/// </summary>
|
||||
public bool IsVisible { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the DotComButtonString
|
||||
/// </summary>
|
||||
public string DotComButtonString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -441,21 +447,33 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Event args for keyboard key presses
|
||||
/// </summary>
|
||||
public class KeyboardControllerPressEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Text
|
||||
/// </summary>
|
||||
public string Text { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SpecialKey
|
||||
/// </summary>
|
||||
public KeyboardSpecialKey SpecialKey { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="text"></param>
|
||||
public KeyboardControllerPressEventArgs(string text)
|
||||
{
|
||||
Text = text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="key">special keyboard key</param>
|
||||
public KeyboardControllerPressEventArgs(KeyboardSpecialKey key)
|
||||
{
|
||||
SpecialKey = key;
|
||||
@@ -467,6 +485,29 @@ namespace PepperDash.Essentials.Core.Touchpanels.Keyboards
|
||||
/// </summary>
|
||||
public enum KeyboardSpecialKey
|
||||
{
|
||||
None = 0, Backspace, Clear, GoButton, SecondaryButton
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
None = 0,
|
||||
|
||||
/// <summary>
|
||||
/// Backspace
|
||||
/// </summary>
|
||||
Backspace,
|
||||
|
||||
/// <summary>
|
||||
/// Clear
|
||||
/// </summary>
|
||||
Clear,
|
||||
|
||||
/// <summary>
|
||||
/// GoButton
|
||||
/// </summary>
|
||||
GoButton,
|
||||
|
||||
/// <summary>
|
||||
/// SecondaryButton
|
||||
/// </summary>
|
||||
SecondaryButton
|
||||
}
|
||||
}
|
||||
@@ -113,8 +113,13 @@ namespace PepperDash.Essentials.Core
|
||||
/// Shows the dialog
|
||||
/// </summary>
|
||||
/// <param name="numberOfButtons">Number of buttons to show. 0, 1, 2</param>
|
||||
/// <param name="timeMs">The amount of time to show the dialog. Use 0 for no timeout.</param>
|
||||
/// <param name="decreasingGauge">If the progress bar gauge needs to count down instead of up</param>
|
||||
/// <param name="title">Title text</param>
|
||||
/// <param name="iconName">Icon name</param>
|
||||
/// <param name="message">Message text</param>
|
||||
/// <param name="button1Text">Button 1 text</param>
|
||||
/// <param name="button2Text">Button 2 text</param>
|
||||
/// <param name="showGauge">True to show the gauge</param>
|
||||
/// <param name="showCancel">True to show the cancel "X" button</param>
|
||||
/// <param name="completeAction">The action to run when the dialog is dismissed. Parameter will be 1 or 2 if button pressed, or 0 if dialog times out</param>
|
||||
/// <returns>True when modal is created.</returns>
|
||||
public bool PresentModalDialog(uint numberOfButtons, string title, string iconName,
|
||||
|
||||
@@ -19,6 +19,13 @@ namespace PepperDash.Essentials.Core.Touchpanels
|
||||
|
||||
readonly Dictionary<string, KeypadButton> _buttons;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="key">device key</param>
|
||||
/// <param name="name">device name</param>
|
||||
/// <param name="processor">control system processor</param>
|
||||
/// <param name="buttons">dictionary of keypad buttons</param>
|
||||
public Mpc3TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
|
||||
: base(key, name)
|
||||
{
|
||||
@@ -348,12 +355,21 @@ namespace PepperDash.Essentials.Core.Touchpanels
|
||||
/// </summary>
|
||||
public class KeypadButton
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the EventTypes
|
||||
/// </summary>
|
||||
[JsonProperty("eventTypes")]
|
||||
public Dictionary<string, DeviceActionWrapper[]> EventTypes { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Feedback
|
||||
/// </summary>
|
||||
[JsonProperty("feedback")]
|
||||
public KeypadButtonFeedback Feedback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
public KeypadButton()
|
||||
{
|
||||
EventTypes = new Dictionary<string, DeviceActionWrapper[]>();
|
||||
@@ -361,17 +377,20 @@ namespace PepperDash.Essentials.Core.Touchpanels
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a KeypadButtonFeedback
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a KeypadButtonFeedback
|
||||
/// </summary>
|
||||
public class KeypadButtonFeedback
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
[JsonProperty("deviceKey")]
|
||||
/// <summary>
|
||||
/// Gets or sets the DeviceKey
|
||||
/// </summary>
|
||||
public string DeviceKey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the FeedbackName
|
||||
/// </summary>
|
||||
[JsonProperty("feedbackName")]
|
||||
public string FeedbackName { get; set; }
|
||||
}
|
||||
|
||||
@@ -44,6 +44,13 @@ namespace PepperDash.Essentials.Core
|
||||
return tl.BooleanOutput[sigNum].SetBoolSigAction(a);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Attaches a void Action to a TriList's output sig's UserObject, to be run on press
|
||||
/// </summary>
|
||||
/// <param name="tl">trilist</param>
|
||||
/// <param name="sigNum">number of the signal</param>
|
||||
/// <param name="a">action to run when the signal is true (pressed)</param>
|
||||
/// <returns></returns>
|
||||
public static BoolOutputSig SetSigTrueAction(this BasicTriList tl, uint sigNum, Action a)
|
||||
{
|
||||
return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if(b) a(); });
|
||||
@@ -53,9 +60,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// Attaches a void Action to a TriList's output sig's UserObject, to be run on release
|
||||
/// </summary>
|
||||
/// <returns>The sig</returns>
|
||||
/// <summary>
|
||||
/// SetSigFalseAction method
|
||||
/// </summary>
|
||||
public static BoolOutputSig SetSigFalseAction(this BasicTriList tl, uint sigNum, Action a)
|
||||
{
|
||||
return tl.BooleanOutput[sigNum].SetBoolSigAction(b => { if (!b) a(); });
|
||||
@@ -143,43 +147,35 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// SetUShortSigAction method
|
||||
/// </summary>
|
||||
/// <param name="sig"></param>
|
||||
/// <param name="a"></param>
|
||||
/// <returns>The Sig</returns>
|
||||
/// <summary>
|
||||
/// SetUShortSigAction method
|
||||
/// </summary>
|
||||
public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action<ushort> a)
|
||||
public static UShortOutputSig SetUShortSigAction(this UShortOutputSig sig, Action<ushort> a)
|
||||
{
|
||||
sig.UserObject = a;
|
||||
return sig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// SetUShortSigAction method
|
||||
/// </summary>
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <param name="a"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// SetUShortSigAction method
|
||||
/// </summary>
|
||||
public static UShortOutputSig SetUShortSigAction(this BasicTriList tl, uint sigNum, Action<ushort> a)
|
||||
{
|
||||
return tl.UShortOutput[sigNum].SetUShortSigAction(a);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// SetStringSigAction method
|
||||
/// </summary>
|
||||
/// <param name="sig"></param>
|
||||
/// <param name="a"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// SetStringSigAction method
|
||||
/// </summary>
|
||||
public static StringOutputSig SetStringSigAction(this StringOutputSig sig, Action<string> a)
|
||||
{
|
||||
sig.UserObject = a;
|
||||
@@ -187,50 +183,50 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// SetStringSigAction method
|
||||
/// </summary>
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <param name="a"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// SetStringSigAction method
|
||||
/// </summary>
|
||||
public static StringOutputSig SetStringSigAction(this BasicTriList tl, uint sigNum, Action<string> a)
|
||||
{
|
||||
return tl.StringOutput[sigNum].SetStringSigAction(a);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// ClearSigAction method
|
||||
/// </summary>
|
||||
/// <param name="sig"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// ClearSigAction method
|
||||
/// </summary>
|
||||
public static Sig ClearSigAction(this Sig sig)
|
||||
{
|
||||
sig.UserObject = null;
|
||||
return sig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ClearBoolSigAction method
|
||||
/// </summary>
|
||||
/// <param name="tl">trilist</param>
|
||||
/// <param name="sigNum">signal number to clear</param>
|
||||
/// <returns></returns>
|
||||
public static BoolOutputSig ClearBoolSigAction(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return ClearSigAction(tl.BooleanOutput[sigNum]) as BoolOutputSig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ClearUShortSigAction method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// ClearUShortSigAction method
|
||||
/// </summary>
|
||||
public static UShortOutputSig ClearUShortSigAction(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return ClearSigAction(tl.UShortOutput[sigNum]) as UShortOutputSig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ClearStringSigAction method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// ClearStringSigAction method
|
||||
/// </summary>
|
||||
public static StringOutputSig ClearStringSigAction(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return ClearSigAction(tl.StringOutput[sigNum]) as StringOutputSig;
|
||||
@@ -270,9 +266,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <summary>
|
||||
/// PulseBool method
|
||||
/// </summary>
|
||||
public static void PulseBool(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
tl.BooleanInput[sigNum].Pulse();
|
||||
@@ -284,9 +277,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <param name="ms"></param>
|
||||
/// <summary>
|
||||
/// PulseBool method
|
||||
/// </summary>
|
||||
public static void PulseBool(this BasicTriList tl, uint sigNum, int ms)
|
||||
{
|
||||
tl.BooleanInput[sigNum].Pulse(ms);
|
||||
@@ -308,6 +298,13 @@ namespace PepperDash.Essentials.Core
|
||||
tl.StringInput[sigNum].StringValue = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Helper method to set the value of a string Sig on TriList with encoding
|
||||
/// </summary>
|
||||
/// <param name="tl">trilist</param>
|
||||
/// <param name="sigNum">signal number to set</param>
|
||||
/// <param name="value">string value to set</param>
|
||||
/// <param name="encoding">string encoding to use</param>
|
||||
public static void SetString(this BasicTriList tl, uint sigNum, string value, eStringEncoding encoding)
|
||||
{
|
||||
tl.StringInput[sigNum].StringEncoding = encoding;
|
||||
@@ -320,9 +317,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetBool method
|
||||
/// </summary>
|
||||
public static bool GetBool(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return tl.BooleanOutput[sigNum].BoolValue;
|
||||
@@ -334,9 +328,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetUshort method
|
||||
/// </summary>
|
||||
public static ushort GetUshort(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return tl.UShortOutput[sigNum].UShortValue;
|
||||
@@ -348,9 +339,6 @@ namespace PepperDash.Essentials.Core
|
||||
/// <param name="tl"></param>
|
||||
/// <param name="sigNum"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetString method
|
||||
/// </summary>
|
||||
public static string GetString(this BasicTriList tl, uint sigNum)
|
||||
{
|
||||
return tl.StringOutput[sigNum].StringValue;
|
||||
|
||||
Reference in New Issue
Block a user