mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-01 13:55:05 +00:00
docs: complete XML documentation for all projects with inheritdoc tags
Co-authored-by: andrew-welker <1765622+andrew-welker@users.noreply.github.com>
This commit is contained in:
@@ -8,12 +8,30 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectDPad
|
||||
/// </summary>
|
||||
public class SmartObjectDPad : SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the SigUp
|
||||
/// </summary>
|
||||
public BoolOutputSig SigUp { get { return GetBoolOutputNamed("Up"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigDown
|
||||
/// </summary>
|
||||
public BoolOutputSig SigDown { get { return GetBoolOutputNamed("Down"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigLeft
|
||||
/// </summary>
|
||||
public BoolOutputSig SigLeft { get { return GetBoolOutputNamed("Left"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigRight
|
||||
/// </summary>
|
||||
public BoolOutputSig SigRight { get { return GetBoolOutputNamed("Right"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigCenter
|
||||
/// </summary>
|
||||
public BoolOutputSig SigCenter { get { return GetBoolOutputNamed("Center"); } }
|
||||
|
||||
public SmartObjectDPad(SmartObject so, bool useUserObjectHandler)
|
||||
|
||||
@@ -12,11 +12,17 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectDynamicList
|
||||
/// </summary>
|
||||
public class SmartObjectDynamicList : SmartObjectHelperBase
|
||||
{
|
||||
public const string SigNameScrollToItem = "Scroll To Item";
|
||||
public const string SigNameSetNumberOfItems = "Set Number of Items";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the NameSigOffset
|
||||
/// </summary>
|
||||
public uint NameSigOffset { get; private set; }
|
||||
|
||||
public ushort Count
|
||||
@@ -28,10 +34,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
set { SmartObject.UShortInput[SigNameSetNumberOfItems].UShortValue = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The limit of the list object, as defined by VTPro settings. Zero if object
|
||||
/// is not a list
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the MaxCount
|
||||
/// </summary>
|
||||
public int MaxCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -57,9 +62,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Builds a new list item
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// SetItem method
|
||||
/// </summary>
|
||||
public void SetItem(uint index, string mainText, string iconName, Action<bool> action)
|
||||
{
|
||||
SetItemMainText(index, mainText);
|
||||
@@ -78,6 +83,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItemMainText method
|
||||
/// </summary>
|
||||
public void SetItemMainText(uint index, string text)
|
||||
{
|
||||
if (index > MaxCount) return;
|
||||
@@ -85,21 +93,27 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
(SmartObject.Device as BasicTriList).StringInput[NameSigOffset + index].StringValue = text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItemIcon method
|
||||
/// </summary>
|
||||
public void SetItemIcon(uint index, string iconName)
|
||||
{
|
||||
if (index > MaxCount) return;
|
||||
SmartObject.StringInput[string.Format("Set Item {0} Icon Serial", index)].StringValue = iconName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItemButtonAction method
|
||||
/// </summary>
|
||||
public void SetItemButtonAction(uint index, Action<bool> action)
|
||||
{
|
||||
if (index > MaxCount) return;
|
||||
SmartObject.BooleanOutput[string.Format("Item {0} Pressed", index)].UserObject = action;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the feedback on the given line, clearing others when interlocked is set
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// SetFeedback method
|
||||
/// </summary>
|
||||
public void SetFeedback(uint index, bool interlocked)
|
||||
{
|
||||
if (interlocked)
|
||||
@@ -107,9 +121,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
SmartObject.BooleanInput[string.Format("Item {0} Selected", index)].BoolValue = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clears all button feedbacks
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// ClearFeedbacks method
|
||||
/// </summary>
|
||||
public void ClearFeedbacks()
|
||||
{
|
||||
for(int i = 1; i<= Count; i++)
|
||||
|
||||
@@ -11,13 +11,19 @@ using Serilog.Events;
|
||||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectHelperBase
|
||||
/// </summary>
|
||||
public class SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the SmartObject
|
||||
/// </summary>
|
||||
public SmartObject SmartObject { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// This should be set by all inheriting classes, after the class has verified that it is linked to the right object.
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the Validated
|
||||
/// </summary>
|
||||
public bool Validated { get; protected set; }
|
||||
|
||||
public SmartObjectHelperBase(SmartObject so, bool useUserObjectHandler)
|
||||
@@ -41,6 +47,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
/// <summary>
|
||||
/// GetBoolOutputNamed method
|
||||
/// </summary>
|
||||
public BoolOutputSig GetBoolOutputNamed(string name)
|
||||
{
|
||||
if (SmartObject.BooleanOutput.Contains(name))
|
||||
@@ -56,6 +65,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="a"></param>
|
||||
/// <summary>
|
||||
/// SetBoolAction method
|
||||
/// </summary>
|
||||
public void SetBoolAction(string name, Action<bool> a)
|
||||
{
|
||||
if (SmartObject.BooleanOutput.Contains(name))
|
||||
|
||||
@@ -8,14 +8,17 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
||||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectNumeric
|
||||
/// </summary>
|
||||
public class SmartObjectNumeric : SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Defaults to "Misc_1". The name of the button in VTPro (Usually the text)
|
||||
/// Gets or sets the Misc1SigName
|
||||
/// </summary>
|
||||
public string Misc1SigName { get; set; }
|
||||
/// <summary>
|
||||
/// Defaults to "Misc_2". The name of the button in VTPro (Usually the text)
|
||||
/// Gets or sets the Misc2SigName
|
||||
/// </summary>
|
||||
public string Misc2SigName { get; set; }
|
||||
|
||||
@@ -23,13 +26,28 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
||||
public BoolOutputSig Digit2 { get { return GetBoolOutputNamed("2"); } }
|
||||
public BoolOutputSig Digit3 { get { return GetBoolOutputNamed("3"); } }
|
||||
public BoolOutputSig Digit4 { get { return GetBoolOutputNamed("4"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit5
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit5 { get { return GetBoolOutputNamed("5"); } }
|
||||
public BoolOutputSig Digit6 { get { return GetBoolOutputNamed("6"); } }
|
||||
public BoolOutputSig Digit7 { get { return GetBoolOutputNamed("7"); } }
|
||||
public BoolOutputSig Digit8 { get { return GetBoolOutputNamed("8"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit9
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit9 { get { return GetBoolOutputNamed("9"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit0
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit0 { get { return GetBoolOutputNamed("0"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc1
|
||||
/// </summary>
|
||||
public BoolOutputSig Misc1 { get { return GetBoolOutputNamed(Misc1SigName); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc2
|
||||
/// </summary>
|
||||
public BoolOutputSig Misc2 { get { return GetBoolOutputNamed(Misc2SigName); } }
|
||||
|
||||
public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler)
|
||||
|
||||
@@ -38,10 +38,22 @@ namespace PepperDash.Essentials.Core
|
||||
}
|
||||
public ushort MaxDefinedItems { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ScrollToItemSig
|
||||
/// </summary>
|
||||
public UShortInputSig ScrollToItemSig { get; private set; }
|
||||
UShortInputSig SetNumberOfItemsSig;
|
||||
/// <summary>
|
||||
/// Gets or sets the BoolIncrement
|
||||
/// </summary>
|
||||
public uint BoolIncrement { get; protected set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the UShortIncrement
|
||||
/// </summary>
|
||||
public uint UShortIncrement { get; protected set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the StringIncrement
|
||||
/// </summary>
|
||||
public uint StringIncrement { get; protected set; }
|
||||
|
||||
protected readonly SmartObject SRL;
|
||||
@@ -84,16 +96,17 @@ namespace PepperDash.Essentials.Core
|
||||
/// DOES NOT adjust Count
|
||||
/// </summary>
|
||||
/// <param name="item"></param>
|
||||
/// <summary>
|
||||
/// AddItem method
|
||||
/// </summary>
|
||||
public void AddItem(SubpageReferenceListItem item)
|
||||
{
|
||||
Items.Add(item);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Items need to be responsible for managing their own deallocation process,
|
||||
/// disconnecting from events, etc.
|
||||
///
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Clear method
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
// If a line item needs to disconnect an CueActionPair or do something to release RAM
|
||||
@@ -106,10 +119,9 @@ namespace PepperDash.Essentials.Core
|
||||
ScrollToItemSig.UShortValue = 1;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Optional call to refresh the signals on the objects in the SRL - this calls Refresh() on
|
||||
/// all SubpageReferenceListItem items
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Refresh method
|
||||
/// </summary>
|
||||
public void Refresh()
|
||||
{
|
||||
foreach (var item in Items) item.Refresh();
|
||||
@@ -251,6 +263,9 @@ namespace PepperDash.Essentials.Core
|
||||
/// </summary>
|
||||
/// <param name="currentDevice"></param>
|
||||
/// <param name="args"></param>
|
||||
/// <summary>
|
||||
/// SRL_SigChange method
|
||||
/// </summary>
|
||||
public static void SRL_SigChange(GenericBase currentDevice, SmartObjectEventArgs args)
|
||||
{
|
||||
var uo = args.Sig.UserObject;
|
||||
|
||||
@@ -8,6 +8,9 @@ using Crestron.SimplSharpPro.UI;
|
||||
|
||||
namespace PepperDash.Essentials.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SubpageReferenceListItem
|
||||
/// </summary>
|
||||
public class SubpageReferenceListItem
|
||||
{
|
||||
/// <summary>
|
||||
@@ -22,13 +25,17 @@ namespace PepperDash.Essentials.Core
|
||||
Owner = owner;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called by SRL to release all referenced objects
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Clear method
|
||||
/// </summary>
|
||||
/// <inheritdoc />
|
||||
public virtual void Clear()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Refresh method
|
||||
/// </summary>
|
||||
public virtual void Refresh() { }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user