mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
fix: Adds new property to EssentialsRoomBase and implements consistent default key if no key set
This commit is contained in:
@@ -59,28 +59,81 @@ namespace PepperDash.Essentials.Core
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public IMobileControlRoomMessenger MobileControlRoomBridge { get; private set; }
|
public IMobileControlRoomMessenger MobileControlRoomBridge { get; private set; }
|
||||||
|
|
||||||
|
protected const string _defaultListKey = "default";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The config name of the source list
|
/// The config name of the source list
|
||||||
/// </summary>
|
/// </summary>
|
||||||
///
|
///
|
||||||
protected string _SourceListKey;
|
private string _sourceListKey;
|
||||||
public string SourceListKey {
|
public string SourceListKey {
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return _SourceListKey;
|
if(string.IsNullOrEmpty(_sourceListKey))
|
||||||
}
|
|
||||||
private set
|
|
||||||
{
|
|
||||||
if (value != _SourceListKey)
|
|
||||||
{
|
{
|
||||||
_SourceListKey = value;
|
return _defaultListKey;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return _sourceListKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected set
|
||||||
|
{
|
||||||
|
if (value != _sourceListKey)
|
||||||
|
{
|
||||||
|
_sourceListKey = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public string DestinationListKey { get; private set; }
|
private string _destinationListKey;
|
||||||
|
public string DestinationListKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_destinationListKey))
|
||||||
|
{
|
||||||
|
return _defaultListKey;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return _destinationListKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected set
|
||||||
|
{
|
||||||
|
if (value != _destinationListKey)
|
||||||
|
{
|
||||||
|
_destinationListKey = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string _levelControlListKey;
|
||||||
|
public string LevelControlListKey
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_levelControlListKey))
|
||||||
|
{
|
||||||
|
return _defaultListKey;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return _destinationListKey;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
protected set
|
||||||
|
{
|
||||||
|
if (value != _levelControlListKey)
|
||||||
|
{
|
||||||
|
_levelControlListKey = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected const string _defaultSourceListKey = "default";
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Timer used for informing the UIs of a shutdown
|
/// Timer used for informing the UIs of a shutdown
|
||||||
@@ -192,7 +245,7 @@ namespace PepperDash.Essentials.Core
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sourceListKey = _defaultSourceListKey;
|
sourceListKey = _defaultListKey;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user