mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
update config with DestinationList
This commit is contained in:
@@ -1,23 +1,50 @@
|
|||||||
using System;
|
using Newtonsoft.Json;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using Crestron.SimplSharp;
|
|
||||||
using Newtonsoft.Json;
|
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
|
|
||||||
namespace PepperDash_Essentials_Core.Devices
|
namespace PepperDash_Essentials_Core.Devices
|
||||||
{
|
{
|
||||||
public class DestinationListItem
|
public class DestinationListItem
|
||||||
{
|
{
|
||||||
[JsonProperty("sinkYey")]
|
[JsonProperty("sinkKey")]
|
||||||
public string SinkKey { get; set; }
|
public string SinkKey { get; set; }
|
||||||
|
|
||||||
private EssentialsDevice _sinkDevice;
|
private EssentialsDevice _sinkDevice;
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
public EssentialsDevice SinkDevice
|
public EssentialsDevice SinkDevice
|
||||||
{
|
{
|
||||||
get { return _sinkDevice ?? (_sinkDevice = DeviceManager.GetDeviceForKey(SinkKey) as EssentialsDevice); }
|
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; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -184,6 +184,7 @@
|
|||||||
<Compile Include="Crestron IO\StatusSign\StatusSignController.cs" />
|
<Compile Include="Crestron IO\StatusSign\StatusSignController.cs" />
|
||||||
<Compile Include="Devices\CodecInterfaces.cs" />
|
<Compile Include="Devices\CodecInterfaces.cs" />
|
||||||
<Compile Include="Devices\CrestronProcessor.cs" />
|
<Compile Include="Devices\CrestronProcessor.cs" />
|
||||||
|
<Compile Include="Devices\DestinationListItem.cs" />
|
||||||
<Compile Include="Devices\DeviceApiBase.cs" />
|
<Compile Include="Devices\DeviceApiBase.cs" />
|
||||||
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
|
<Compile Include="Devices\DeviceFeedbackExtensions.cs" />
|
||||||
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
|
<Compile Include="Devices\EssentialsBridgeableDevice.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user