Example #1
0
 /// <summary>
 /// Send a WinLirc command
 /// </summary>
 /// <param name="command">The WinLirc command to send</param>
 /// <exception cref="WinLircCommandNotSupportedException">If the given command is not supported by the device</exception>
 public void SendWinLircCommand(WinLircCommand command)
 {
     if (!SupportsWinLircCommand(command))
     {
         throw new WinLircCommandNotSupportedException(command);
     }
     else
     {
         var commandString    = Enum.GetName(typeof(WinLircCommand), command).ToLower();
         var remoteAndCommand = _winLircCommands[commandString];
         this.SendWinLircCommand(remoteAndCommand.Item1, remoteAndCommand.Item2);
     }
 }
Example #2
0
 public WinLircCommandNotSupportedException(WinLircCommand command, string message) : base(message)
 {
     Command = command;
 }
Example #3
0
 public WinLircCommandNotSupportedException(WinLircCommand command) : base()
 {
     Command = command;
 }
Example #4
0
 /// <summary>
 /// Checks for support of a WinLirc command
 /// </summary>
 /// <param name="command">The WinLircCommand to check</param>
 /// <returns>True if this device supports the given WinLirc command, otherwise false</returns>
 public bool SupportsWinLircCommand(WinLircCommand command)
 {
     return(this.SupportsWinLircCommand(
                Enum.GetName(typeof(WinLircCommand), command).ToLower()
                ));
 }