Compare commits

..

1 Commits

Author SHA1 Message Date
Neil Dorin
21f9795bcd Implements ITvPresetsProvider on IrSetTopBoxBase 2021-01-28 14:05:59 -07:00
4 changed files with 10 additions and 9 deletions

View File

@@ -31,7 +31,7 @@ namespace PepperDash.Essentials.Core
/// </summary>
bool HasDpad { get; }
PepperDash.Essentials.Core.Presets.DevicePresetsModel PresetsModel { get; }
PepperDash.Essentials.Core.Presets.DevicePresetsModel TvPresets { get; }
void LoadPresets(string filePath);
void DvrList(bool pressRelease);

View File

@@ -169,9 +169,9 @@ namespace PepperDash.Essentials.Core.PageManagers
}
// Build presets
if (stb.HasPresets && stb.PresetsModel != null)
if (stb.HasPresets && stb.TvPresets != null)
{
PresetsView = new DevicePresetsView(trilist, stb.PresetsModel);
PresetsView = new DevicePresetsView(trilist, stb.TvPresets);
}
}

View File

@@ -18,8 +18,8 @@ namespace PepperDash.Essentials.Core.PageManagers
{
SetTopBox = stb;
TriList = trilist;
if(stb.PresetsModel != null)
PresetsView = new DevicePresetsView(trilist, stb.PresetsModel);
if(stb.TvPresets != null)
PresetsView = new DevicePresetsView(trilist, stb.TvPresets);
}
public override void Show()

View File

@@ -12,11 +12,12 @@ using PepperDash.Essentials.Core.Bridges;
using PepperDash.Essentials.Core.Config;
using PepperDash.Essentials.Core.Presets;
using PepperDash.Essentials.Core.Routing;
using PepperDash.Essentials.Core.DeviceTypeInterfaces;
namespace PepperDash.Essentials.Devices.Common
{
[Description("Wrapper class for an IR Set Top Box")]
public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IHasPowerControl
public class IRSetTopBoxBase : EssentialsBridgeableDevice, ISetTopBoxControls, IRoutingOutputs, IUsageTracking, IHasPowerControl, ITvPresetsProvider
{
public IrOutputPortController IrPort { get; private set; }
@@ -28,7 +29,7 @@ namespace PepperDash.Essentials.Devices.Common
public bool HasDpad { get; set; }
public bool HasNumeric { get; set; }
public DevicePresetsModel PresetsModel { get; private set; }
public DevicePresetsModel TvPresets { get; private set; }
public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont,
SetTopBoxPropertiesConfig props)
@@ -66,8 +67,8 @@ namespace PepperDash.Essentials.Devices.Common
public void LoadPresets(string filePath)
{
PresetsModel = new DevicePresetsModel(Key + "-presets", this, filePath);
DeviceManager.AddDevice(PresetsModel);
TvPresets = new DevicePresetsModel(Key + "-presets", this, filePath);
DeviceManager.AddDevice(TvPresets);
}