mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-12 11:15:08 +00:00
Adds summary help and Room ActivityComponentBase
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user