mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
docs: update XML comments for Essentials Core
This commit is contained in:
parent
0764685c51
commit
f88bb13367
260 changed files with 7018 additions and 1318 deletions
|
|
@ -13,27 +13,36 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
/// </summary>
|
||||
public class SmartObjectDPad : SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the SigUp
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the SigUp
|
||||
/// </summary>
|
||||
public BoolOutputSig SigUp { get { return GetBoolOutputNamed("Up"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigDown
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SigDown
|
||||
/// </summary>
|
||||
public BoolOutputSig SigDown { get { return GetBoolOutputNamed("Down"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigLeft
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SigLeft
|
||||
/// </summary>
|
||||
public BoolOutputSig SigLeft { get { return GetBoolOutputNamed("Left"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigRight
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SigRight
|
||||
/// </summary>
|
||||
public BoolOutputSig SigRight { get { return GetBoolOutputNamed("Right"); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the SigCenter
|
||||
/// </summary>
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SigCenter
|
||||
/// </summary>
|
||||
public BoolOutputSig SigCenter { get { return GetBoolOutputNamed("Center"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="so">smart object</param>
|
||||
/// <param name="useUserObjectHandler">use user object handler if true</param>
|
||||
public SmartObjectDPad(SmartObject so, bool useUserObjectHandler)
|
||||
: base(so, useUserObjectHandler)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,14 +17,24 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
/// </summary>
|
||||
public class SmartObjectDynamicList : SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Sig name for Scroll To Item
|
||||
/// </summary>
|
||||
public const string SigNameScrollToItem = "Scroll To Item";
|
||||
|
||||
/// <summary>
|
||||
/// Sig name for Set Number of Items
|
||||
/// </summary>
|
||||
public const string SigNameSetNumberOfItems = "Set Number of Items";
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the NameSigOffset
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the NameSigOffset
|
||||
/// </summary>
|
||||
public uint NameSigOffset { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Count
|
||||
/// </summary>
|
||||
public ushort Count
|
||||
{
|
||||
get
|
||||
|
|
@ -34,9 +44,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
set { SmartObject.UShortInput[SigNameSetNumberOfItems].UShortValue = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the MaxCount
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the MaxCount
|
||||
/// </summary>
|
||||
public int MaxCount { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
@ -62,9 +72,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItem method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// SetItem method
|
||||
/// </summary>
|
||||
public void SetItem(uint index, string mainText, string iconName, Action<bool> action)
|
||||
{
|
||||
SetItemMainText(index, mainText);
|
||||
|
|
@ -83,9 +93,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
//}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItemMainText method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// SetItemMainText method
|
||||
/// </summary>
|
||||
public void SetItemMainText(uint index, string text)
|
||||
{
|
||||
if (index > MaxCount) return;
|
||||
|
|
@ -93,27 +103,27 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
(SmartObject.Device as BasicTriList).StringInput[NameSigOffset + index].StringValue = text;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// SetItemIcon method
|
||||
/// </summary>
|
||||
/// <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>
|
||||
/// <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>
|
||||
/// SetFeedback method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// SetFeedback method
|
||||
/// </summary>
|
||||
public void SetFeedback(uint index, bool interlocked)
|
||||
{
|
||||
if (interlocked)
|
||||
|
|
@ -121,9 +131,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
SmartObject.BooleanInput[string.Format("Item {0} Selected", index)].BoolValue = true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ClearFeedbacks method
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// ClearFeedbacks method
|
||||
/// </summary>
|
||||
public void ClearFeedbacks()
|
||||
{
|
||||
for(int i = 1; i<= Count; i++)
|
||||
|
|
|
|||
|
|
@ -11,21 +11,26 @@ using Serilog.Events;
|
|||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectHelperBase
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectHelperBase
|
||||
/// </summary>
|
||||
public class SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the SmartObject
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the SmartObject
|
||||
/// </summary>
|
||||
public SmartObject SmartObject { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Validated
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Gets or sets the Validated
|
||||
/// </summary>
|
||||
public bool Validated { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="so">smart object</param>
|
||||
/// <param name="useUserObjectHandler">use the user object hadnler if true</param>
|
||||
public SmartObjectHelperBase(SmartObject so, bool useUserObjectHandler)
|
||||
{
|
||||
SmartObject = so;
|
||||
|
|
@ -37,6 +42,9 @@ namespace PepperDash.Essentials.Core.SmartObjects
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Destructor
|
||||
/// </summary>
|
||||
~SmartObjectHelperBase()
|
||||
{
|
||||
SmartObject.SigChange -= this.SmartObject_SigChange;
|
||||
|
|
@ -47,9 +55,6 @@ 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))
|
||||
|
|
|
|||
|
|
@ -8,52 +8,90 @@ using Crestron.SimplSharpPro.DeviceSupport;
|
|||
|
||||
namespace PepperDash.Essentials.Core.SmartObjects
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectNumeric
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Represents a SmartObjectNumeric
|
||||
/// </summary>
|
||||
public class SmartObjectNumeric : SmartObjectHelperBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc1SigName
|
||||
/// </summary>
|
||||
public string Misc1SigName { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc2SigName
|
||||
/// </summary>
|
||||
public string Misc2SigName { get; set; }
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc1SigName
|
||||
/// </summary>
|
||||
public string Misc1SigName { get; set; }
|
||||
|
||||
public BoolOutputSig Digit1 { get { return GetBoolOutputNamed("1"); } }
|
||||
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); } }
|
||||
/// <summary>
|
||||
/// Gets or sets the Misc2SigName
|
||||
/// </summary>
|
||||
public string Misc2SigName { get; set; }
|
||||
|
||||
public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler)
|
||||
{
|
||||
Misc1SigName = "Misc_1";
|
||||
Misc2SigName = "Misc_2";
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit1
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit1 { get { return GetBoolOutputNamed("1"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit2
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit2 { get { return GetBoolOutputNamed("2"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit3
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit3 { get { return GetBoolOutputNamed("3"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit4
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit4 { get { return GetBoolOutputNamed("4"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit5
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit5 { get { return GetBoolOutputNamed("5"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit6
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit6 { get { return GetBoolOutputNamed("6"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit7
|
||||
/// </summary>
|
||||
public BoolOutputSig Digit7 { get { return GetBoolOutputNamed("7"); } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Digit8
|
||||
/// </summary>
|
||||
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); } }
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="so">smart object</param>
|
||||
/// <param name="useUserObjectHandler">use user handler if true</param>
|
||||
public SmartObjectNumeric(SmartObject so, bool useUserObjectHandler) : base(so, useUserObjectHandler)
|
||||
{
|
||||
Misc1SigName = "Misc_1";
|
||||
Misc2SigName = "Misc_2";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -30,35 +30,60 @@ namespace PepperDash.Essentials.Core
|
|||
/// </summary>
|
||||
public class SubpageReferenceList
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Count
|
||||
/// </summary>
|
||||
public ushort Count
|
||||
{
|
||||
get { return SetNumberOfItemsSig.UShortValue; }
|
||||
set { SetNumberOfItemsSig.UShortValue = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the MaxDefinedItems
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the SRL
|
||||
/// </summary>
|
||||
protected readonly SmartObject SRL;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the list of items in the SRL
|
||||
/// </summary>
|
||||
protected readonly List<SubpageReferenceListItem> Items = new List<SubpageReferenceListItem>();
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="triList">trilist for the smart object</param>
|
||||
/// <param name="smartObjectId">smart object ID</param>
|
||||
/// <param name="boolIncrement"></param>
|
||||
/// <param name="ushortIncrement"></param>
|
||||
/// <param name="stringIncrement"></param>
|
||||
public SubpageReferenceList(BasicTriListWithSmartObject triList, uint smartObjectId,
|
||||
uint boolIncrement, uint ushortIncrement, uint stringIncrement)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,8 +17,17 @@ namespace PepperDash.Essentials.Core
|
|||
/// The list that this lives in
|
||||
/// </summary>
|
||||
protected SubpageReferenceList Owner;
|
||||
|
||||
/// <summary>
|
||||
/// The index of this item
|
||||
/// </summary>
|
||||
protected uint Index;
|
||||
|
||||
/// <summary>
|
||||
/// Constructor
|
||||
/// </summary>
|
||||
/// <param name="index">index of the item</param>
|
||||
/// <param name="owner">owner of the item</param>
|
||||
public SubpageReferenceListItem(uint index, SubpageReferenceList owner)
|
||||
{
|
||||
Index = index;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue