Adds summary help and Room ActivityComponentBase

This commit is contained in:
Neil Dorin
2021-01-28 18:08:06 -07:00
parent 76a8b50b6f
commit 657b9f1f54
2 changed files with 119 additions and 4 deletions

View File

@@ -35,5 +35,78 @@ namespace PepperDash.Essentials.Core.Room.Components
}
/// <summary>
/// The base class from which Room Activities should be derived
/// </summary>
public abstract class RoomActivityComponentBase : IRoomActivityComponent
{
#region IRoomActivityComponent Members
public BoolFeedback IsEnabledFeedback { get; private set; }
private bool _enable;
public bool Enable
{
set
{
if (value != _enable)
{
_enable = value;
IsEnabledFeedback.FireUpdate();
}
}
}
public string Label { get; private set; }
public string Icon { get; private set; }
public IRoomBehaviourGroupComponent Component { get; private set; }
public int Order { get; private set; }
#endregion
#region IRoomComponent Members
public IComponentRoom Parent { get; private set; }
#endregion
#region IKeyed Members
private string _componentKey;
public string Key
{
get
{
return Parent.Key + "-" + _componentKey;
}
}
#endregion
public RoomActivityComponentBase(string key, IComponentRoom parent)
{
_componentKey = key;
Parent = parent;
IsEnabledFeedback = new BoolFeedback(() => _enable);
}
public void StartActivity()
{
throw new NotImplementedException();
}
public void EndActivity()
{
throw new NotImplementedException();
}
}
}