mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-02-15 20:54:55 +00:00
closes #60 closes #63 closes #51 Exposed and tested occsensor names and raw states. Exposed and tested SetTopBox. Changed conditional formatting for SecondsCountdownTimer
This commit is contained in:
@@ -1,138 +1,149 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Core
|
namespace PepperDash.Essentials.Core
|
||||||
{
|
{
|
||||||
public class SecondsCountdownTimer: IKeyed
|
public class SecondsCountdownTimer: IKeyed
|
||||||
{
|
{
|
||||||
public event EventHandler<EventArgs> HasStarted;
|
public event EventHandler<EventArgs> HasStarted;
|
||||||
public event EventHandler<EventArgs> HasFinished;
|
public event EventHandler<EventArgs> HasFinished;
|
||||||
public event EventHandler<EventArgs> WasCancelled;
|
public event EventHandler<EventArgs> WasCancelled;
|
||||||
|
|
||||||
public string Key { get; private set; }
|
public string Key { get; private set; }
|
||||||
|
|
||||||
public BoolFeedback IsRunningFeedback { get; private set; }
|
public BoolFeedback IsRunningFeedback { get; private set; }
|
||||||
bool _IsRunning;
|
bool _IsRunning;
|
||||||
|
|
||||||
public IntFeedback PercentFeedback { get; private set; }
|
public IntFeedback PercentFeedback { get; private set; }
|
||||||
public StringFeedback TimeRemainingFeedback { get; private set; }
|
public StringFeedback TimeRemainingFeedback { get; private set; }
|
||||||
|
|
||||||
public bool CountsDown { get; set; }
|
public bool CountsDown { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The number of seconds to countdown
|
/// The number of seconds to countdown
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int SecondsToCount { get; set; }
|
public int SecondsToCount { get; set; }
|
||||||
|
|
||||||
public DateTime StartTime { get; private set; }
|
public DateTime StartTime { get; private set; }
|
||||||
public DateTime FinishTime { get; private set; }
|
public DateTime FinishTime { get; private set; }
|
||||||
|
|
||||||
CTimer SecondTimer;
|
CTimer SecondTimer;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="key"></param>
|
/// <param name="key"></param>
|
||||||
public SecondsCountdownTimer(string key)
|
public SecondsCountdownTimer(string key)
|
||||||
{
|
{
|
||||||
Key = key;
|
Key = key;
|
||||||
IsRunningFeedback = new BoolFeedback(() => _IsRunning);
|
IsRunningFeedback = new BoolFeedback(() => _IsRunning);
|
||||||
|
|
||||||
TimeRemainingFeedback = new StringFeedback(() =>
|
TimeRemainingFeedback = new StringFeedback(() =>
|
||||||
{
|
{
|
||||||
// Need to handle up and down here.
|
// Need to handle up and down here.
|
||||||
|
|
||||||
if (StartTime == null || FinishTime == null)
|
if (StartTime == null || FinishTime == null)
|
||||||
return "";
|
return "";
|
||||||
var timeSpan = FinishTime - DateTime.Now;
|
var timeSpan = FinishTime - DateTime.Now;
|
||||||
return Math.Round(timeSpan.TotalSeconds).ToString();
|
|
||||||
});
|
if (timeSpan.TotalSeconds < 60)
|
||||||
|
{
|
||||||
PercentFeedback = new IntFeedback(() =>
|
return Math.Round(timeSpan.TotalSeconds).ToString();
|
||||||
{
|
}
|
||||||
if (StartTime == null || FinishTime == null)
|
else
|
||||||
return 0;
|
{
|
||||||
double percent = (FinishTime - DateTime.Now).TotalSeconds
|
Debug.Console(2, this, "timeSpan.Minutes == {0}, timeSpan.Seconds == {1}", timeSpan.Minutes, timeSpan.Seconds);
|
||||||
/ (FinishTime - StartTime).TotalSeconds
|
return String.Format("{0:D2}:{1:D2}",
|
||||||
* 100;
|
timeSpan.Minutes,
|
||||||
return (int)percent;
|
timeSpan.Seconds);
|
||||||
});
|
}
|
||||||
}
|
});
|
||||||
|
|
||||||
/// <summary>
|
PercentFeedback = new IntFeedback(() =>
|
||||||
/// Starts the Timer
|
{
|
||||||
/// </summary>
|
if (StartTime == null || FinishTime == null)
|
||||||
public void Start()
|
return 0;
|
||||||
{
|
double percent = (FinishTime - DateTime.Now).TotalSeconds
|
||||||
if (_IsRunning)
|
/ (FinishTime - StartTime).TotalSeconds
|
||||||
return;
|
* 100;
|
||||||
StartTime = DateTime.Now;
|
return (int)percent;
|
||||||
FinishTime = StartTime + TimeSpan.FromSeconds(SecondsToCount);
|
});
|
||||||
|
}
|
||||||
if (SecondTimer != null)
|
|
||||||
SecondTimer.Stop();
|
/// <summary>
|
||||||
SecondTimer = new CTimer(SecondElapsedTimerCallback, null, 0, 1000);
|
/// Starts the Timer
|
||||||
_IsRunning = true;
|
/// </summary>
|
||||||
IsRunningFeedback.FireUpdate();
|
public void Start()
|
||||||
|
{
|
||||||
var handler = HasStarted;
|
if (_IsRunning)
|
||||||
if (handler != null)
|
return;
|
||||||
handler(this, new EventArgs());
|
StartTime = DateTime.Now;
|
||||||
}
|
FinishTime = StartTime + TimeSpan.FromSeconds(SecondsToCount);
|
||||||
|
|
||||||
/// <summary>
|
if (SecondTimer != null)
|
||||||
/// Restarts the timer
|
SecondTimer.Stop();
|
||||||
/// </summary>
|
SecondTimer = new CTimer(SecondElapsedTimerCallback, null, 0, 1000);
|
||||||
public void Reset()
|
_IsRunning = true;
|
||||||
{
|
IsRunningFeedback.FireUpdate();
|
||||||
_IsRunning = false;
|
|
||||||
Start();
|
var handler = HasStarted;
|
||||||
}
|
if (handler != null)
|
||||||
|
handler(this, new EventArgs());
|
||||||
/// <summary>
|
}
|
||||||
/// Cancels the timer (without triggering it to finish)
|
|
||||||
/// </summary>
|
/// <summary>
|
||||||
public void Cancel()
|
/// Restarts the timer
|
||||||
{
|
/// </summary>
|
||||||
StopHelper();
|
public void Reset()
|
||||||
|
{
|
||||||
var handler = WasCancelled;
|
_IsRunning = false;
|
||||||
if (handler != null)
|
Start();
|
||||||
handler(this, new EventArgs());
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// Cancels the timer (without triggering it to finish)
|
||||||
/// Called upon expiration, or calling this will force timer to finish.
|
/// </summary>
|
||||||
/// </summary>
|
public void Cancel()
|
||||||
public void Finish()
|
{
|
||||||
{
|
StopHelper();
|
||||||
StopHelper();
|
|
||||||
|
var handler = WasCancelled;
|
||||||
var handler = HasFinished;
|
if (handler != null)
|
||||||
if (handler != null)
|
handler(this, new EventArgs());
|
||||||
handler(this, new EventArgs());
|
}
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
void StopHelper()
|
/// Called upon expiration, or calling this will force timer to finish.
|
||||||
{
|
/// </summary>
|
||||||
if (SecondTimer != null)
|
public void Finish()
|
||||||
SecondTimer.Stop();
|
{
|
||||||
_IsRunning = false;
|
StopHelper();
|
||||||
IsRunningFeedback.FireUpdate();
|
|
||||||
}
|
var handler = HasFinished;
|
||||||
|
if (handler != null)
|
||||||
void SecondElapsedTimerCallback(object o)
|
handler(this, new EventArgs());
|
||||||
{
|
}
|
||||||
PercentFeedback.FireUpdate();
|
|
||||||
TimeRemainingFeedback.FireUpdate();
|
void StopHelper()
|
||||||
|
{
|
||||||
if (DateTime.Now >= FinishTime)
|
if (SecondTimer != null)
|
||||||
Finish();
|
SecondTimer.Stop();
|
||||||
}
|
_IsRunning = false;
|
||||||
}
|
IsRunningFeedback.FireUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void SecondElapsedTimerCallback(object o)
|
||||||
|
{
|
||||||
|
PercentFeedback.FireUpdate();
|
||||||
|
TimeRemainingFeedback.FireUpdate();
|
||||||
|
|
||||||
|
if (DateTime.Now >= FinishTime)
|
||||||
|
Finish();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,343 +1,343 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Crestron.SimplSharp;
|
using Crestron.SimplSharp;
|
||||||
using Crestron.SimplSharpPro;
|
using Crestron.SimplSharpPro;
|
||||||
|
|
||||||
using PepperDash.Core;
|
using PepperDash.Core;
|
||||||
using PepperDash.Essentials.Core;
|
using PepperDash.Essentials.Core;
|
||||||
using PepperDash.Essentials.Core.Presets;
|
using PepperDash.Essentials.Core.Presets;
|
||||||
using PepperDash.Essentials.Core.Routing;
|
using PepperDash.Essentials.Core.Routing;
|
||||||
|
|
||||||
namespace PepperDash.Essentials.Devices.Common
|
namespace PepperDash.Essentials.Devices.Common
|
||||||
{
|
{
|
||||||
public class IRSetTopBoxBase : Device, ISetTopBoxControls, IUiDisplayInfo, IRoutingOutputs, IUsageTracking, IPower
|
public class IRSetTopBoxBase : Device, ISetTopBoxControls, IUiDisplayInfo, IRoutingOutputs, IUsageTracking, IPower
|
||||||
{
|
{
|
||||||
public IrOutputPortController IrPort { get; private set; }
|
public IrOutputPortController IrPort { get; private set; }
|
||||||
|
|
||||||
public uint DisplayUiType { get { return DisplayUiConstants.TypeDirecTv; } }
|
public uint DisplayUiType { get { return DisplayUiConstants.TypeDirecTv; } }
|
||||||
|
|
||||||
|
|
||||||
public bool HasPresets { get; set; }
|
public bool HasPresets { get; set; }
|
||||||
public bool HasDvr { get; set; }
|
public bool HasDvr { get; set; }
|
||||||
public bool HasDpad { get; set; }
|
public bool HasDpad { get; set; }
|
||||||
public bool HasNumeric { get; set; }
|
public bool HasNumeric { get; set; }
|
||||||
|
|
||||||
public DevicePresetsModel PresetsModel { get; private set; }
|
public DevicePresetsModel PresetsModel { get; private set; }
|
||||||
|
|
||||||
public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont,
|
public IRSetTopBoxBase(string key, string name, IrOutputPortController portCont,
|
||||||
SetTopBoxPropertiesConfig props)
|
SetTopBoxPropertiesConfig props)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
IrPort = portCont;
|
IrPort = portCont;
|
||||||
DeviceManager.AddDevice(portCont);
|
DeviceManager.AddDevice(portCont);
|
||||||
|
|
||||||
HasPresets = props.HasPresets;
|
HasPresets = props.HasPresets;
|
||||||
HasDvr = props.HasDvr;
|
HasDvr = props.HasDvr;
|
||||||
HasDpad = props.HasDpad;
|
HasDpad = props.HasDpad;
|
||||||
HasNumeric = props.HasNumeric;
|
HasNumeric = props.HasNumeric;
|
||||||
|
|
||||||
HasKeypadAccessoryButton1 = true;
|
HasKeypadAccessoryButton1 = true;
|
||||||
KeypadAccessoryButton1Command = "Dash";
|
KeypadAccessoryButton1Command = "Dash";
|
||||||
KeypadAccessoryButton1Label = "-";
|
KeypadAccessoryButton1Label = "-";
|
||||||
|
|
||||||
HasKeypadAccessoryButton2 = true;
|
HasKeypadAccessoryButton2 = true;
|
||||||
KeypadAccessoryButton2Command = "NumericEnter";
|
KeypadAccessoryButton2Command = "NumericEnter";
|
||||||
KeypadAccessoryButton2Label = "Enter";
|
KeypadAccessoryButton2Label = "Enter";
|
||||||
|
|
||||||
AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
AnyVideoOut = new RoutingOutputPort(RoutingPortNames.AnyVideoOut, eRoutingSignalType.Audio | eRoutingSignalType.Video,
|
||||||
eRoutingPortConnectionType.Hdmi, null, this);
|
eRoutingPortConnectionType.Hdmi, null, this);
|
||||||
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
AnyAudioOut = new RoutingOutputPort(RoutingPortNames.AnyAudioOut, eRoutingSignalType.Audio,
|
||||||
eRoutingPortConnectionType.DigitalAudio, null, this);
|
eRoutingPortConnectionType.DigitalAudio, null, this);
|
||||||
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { AnyVideoOut, AnyAudioOut };
|
OutputPorts = new RoutingPortCollection<RoutingOutputPort> { AnyVideoOut, AnyAudioOut };
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LoadPresets(string filePath)
|
public void LoadPresets(string filePath)
|
||||||
{
|
{
|
||||||
PresetsModel = new DevicePresetsModel(Key + "-presets", this, filePath);
|
PresetsModel = new DevicePresetsModel(Key + "-presets", this, filePath);
|
||||||
DeviceManager.AddDevice(PresetsModel);
|
DeviceManager.AddDevice(PresetsModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region ISetTopBoxControls Members
|
#region ISetTopBoxControls Members
|
||||||
|
|
||||||
public void DvrList(bool pressRelease)
|
public void DvrList(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_DVR, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_DVR, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Replay(bool pressRelease)
|
public void Replay(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IDPad Members
|
#region IDPad Members
|
||||||
|
|
||||||
public void Up(bool pressRelease)
|
public void Up(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_UP_ARROW, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Down(bool pressRelease)
|
public void Down(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_DN_ARROW, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Left(bool pressRelease)
|
public void Left(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_LEFT_ARROW, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Right(bool pressRelease)
|
public void Right(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_RIGHT_ARROW, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Select(bool pressRelease)
|
public void Select(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_ENTER, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Menu(bool pressRelease)
|
public void Menu(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_MENU, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Exit(bool pressRelease)
|
public void Exit(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_EXIT, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region INumericKeypad Members
|
#region INumericKeypad Members
|
||||||
|
|
||||||
public void Digit0(bool pressRelease)
|
public void Digit0(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_0, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_0, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit1(bool pressRelease)
|
public void Digit1(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_1, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_1, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit2(bool pressRelease)
|
public void Digit2(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_2, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_2, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit3(bool pressRelease)
|
public void Digit3(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_3, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_3, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit4(bool pressRelease)
|
public void Digit4(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_4, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_4, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit5(bool pressRelease)
|
public void Digit5(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_5, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_5, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit6(bool pressRelease)
|
public void Digit6(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_6, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_6, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit7(bool pressRelease)
|
public void Digit7(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_7, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_7, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit8(bool pressRelease)
|
public void Digit8(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_8, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_8, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Digit9(bool pressRelease)
|
public void Digit9(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_9, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_9, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to true
|
/// Defaults to true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasKeypadAccessoryButton1 { get; set; }
|
public bool HasKeypadAccessoryButton1 { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "-"
|
/// Defaults to "-"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string KeypadAccessoryButton1Label { get; set; }
|
public string KeypadAccessoryButton1Label { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "Dash"
|
/// Defaults to "Dash"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string KeypadAccessoryButton1Command { get; set; }
|
public string KeypadAccessoryButton1Command { get; set; }
|
||||||
|
|
||||||
public void KeypadAccessoryButton1(bool pressRelease)
|
public void KeypadAccessoryButton1(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(KeypadAccessoryButton1Command, pressRelease);
|
IrPort.PressRelease(KeypadAccessoryButton1Command, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to true
|
/// Defaults to true
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool HasKeypadAccessoryButton2 { get; set; }
|
public bool HasKeypadAccessoryButton2 { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "Enter"
|
/// Defaults to "Enter"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string KeypadAccessoryButton2Label { get; set; }
|
public string KeypadAccessoryButton2Label { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Defaults to "Enter"
|
/// Defaults to "Enter"
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string KeypadAccessoryButton2Command { get; set; }
|
public string KeypadAccessoryButton2Command { get; set; }
|
||||||
|
|
||||||
public void KeypadAccessoryButton2(bool pressRelease)
|
public void KeypadAccessoryButton2(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(KeypadAccessoryButton2Command, pressRelease);
|
IrPort.PressRelease(KeypadAccessoryButton2Command, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ISetTopBoxNumericKeypad Members
|
#region ISetTopBoxNumericKeypad Members
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to "dash" IR command
|
/// Corresponds to "dash" IR command
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Dash(bool pressRelease)
|
public void Dash(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("dash", pressRelease);
|
IrPort.PressRelease("dash", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Corresponds to "numericEnter" IR command
|
/// Corresponds to "numericEnter" IR command
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void KeypadEnter(bool pressRelease)
|
public void KeypadEnter(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease("numericEnter", pressRelease);
|
IrPort.PressRelease("numericEnter", pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IChannelFunctions Members
|
#region IChannelFunctions Members
|
||||||
|
|
||||||
public void ChannelUp(bool pressRelease)
|
public void ChannelUp(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_CH_PLUS, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_CH_PLUS, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChannelDown(bool pressRelease)
|
public void ChannelDown(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_CH_MINUS, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_CH_MINUS, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LastChannel(bool pressRelease)
|
public void LastChannel(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_LAST, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_LAST, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Guide(bool pressRelease)
|
public void Guide(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_GUIDE, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_GUIDE, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Info(bool pressRelease)
|
public void Info(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_INFO, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_INFO, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IColorFunctions Members
|
#region IColorFunctions Members
|
||||||
|
|
||||||
public void Red(bool pressRelease)
|
public void Red(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RED, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_RED, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Green(bool pressRelease)
|
public void Green(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_GREEN, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_GREEN, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Yellow(bool pressRelease)
|
public void Yellow(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_YELLOW, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_YELLOW, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Blue(bool pressRelease)
|
public void Blue(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_BLUE, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_BLUE, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IRoutingOutputs Members
|
#region IRoutingOutputs Members
|
||||||
|
|
||||||
public RoutingOutputPort AnyVideoOut { get; private set; }
|
public RoutingOutputPort AnyVideoOut { get; private set; }
|
||||||
public RoutingOutputPort AnyAudioOut { get; private set; }
|
public RoutingOutputPort AnyAudioOut { get; private set; }
|
||||||
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
public RoutingPortCollection<RoutingOutputPort> OutputPorts { get; private set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region ITransport Members
|
#region ITransport Members
|
||||||
|
|
||||||
public void ChapMinus(bool pressRelease)
|
public void ChapMinus(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_REPLAY, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ChapPlus(bool pressRelease)
|
public void ChapPlus(bool pressRelease)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FFwd(bool pressRelease)
|
public void FFwd(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_FSCAN, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Pause(bool pressRelease)
|
public void Pause(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Play(bool pressRelease)
|
public void Play(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_PLAY, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Record(bool pressRelease)
|
public void Record(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RECORD, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_RECORD, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Rewind(bool pressRelease)
|
public void Rewind(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_RSCAN, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Stop(bool pressRelease)
|
public void Stop(bool pressRelease)
|
||||||
{
|
{
|
||||||
IrPort.PressRelease(IROutputStandardCommands.IROut_STOP, pressRelease);
|
IrPort.PressRelease(IROutputStandardCommands.IROut_STOP, pressRelease);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IUsageTracking Members
|
#region IUsageTracking Members
|
||||||
|
|
||||||
public UsageTracking UsageTracker { get; set; }
|
public UsageTracking UsageTracker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region IPower Members
|
#region IPower Members
|
||||||
@@ -367,5 +367,5 @@ namespace PepperDash.Essentials.Devices.Common
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user