mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-16 13:15:03 +00:00
add DestinationListItem
This commit is contained in:
@@ -0,0 +1,50 @@
|
|||||||
|
using Newtonsoft.Json;
|
||||||
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
|
namespace PepperDash.Essentials.Core
|
||||||
|
{
|
||||||
|
public class DestinationListItem
|
||||||
|
{
|
||||||
|
[JsonProperty("sinkKey")]
|
||||||
|
public string SinkKey { get; set; }
|
||||||
|
|
||||||
|
private EssentialsDevice _sinkDevice;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
public EssentialsDevice SinkDevice
|
||||||
|
{
|
||||||
|
get { return _sinkDevice ?? (_sinkDevice = DeviceManager.GetDeviceForKey(SinkKey) as EssentialsDevice); }
|
||||||
|
}
|
||||||
|
|
||||||
|
public string PreferredName
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(Name))
|
||||||
|
{
|
||||||
|
return Name;
|
||||||
|
}
|
||||||
|
|
||||||
|
return SinkDevice == null ? "---" : SinkDevice.Name;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[JsonProperty("name")]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("includeInDestinationList")]
|
||||||
|
public bool IncludeInDestinationList { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("order")]
|
||||||
|
public int Order { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("surfaceLocation")]
|
||||||
|
public int SurfaceLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("verticalLocation")]
|
||||||
|
public int VerticalLocation { get; set; }
|
||||||
|
|
||||||
|
[JsonProperty("horizontalLocation")]
|
||||||
|
public int HorizontalLocation { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user