private AquosCommand(string command, string parameters = null, Television television = null) { if (string.IsNullOrEmpty(command)) { throw new ArgumentNullException("command"); } command = command.Trim(); if (command.Length > CommandMaxLength) { throw new ArgumentException("Command cannot be more than four characters"); } if (string.IsNullOrEmpty(parameters)) { parameters = string.Empty; } parameters = parameters.Trim(); if (parameters.Length > ParamMaxLength) { throw new ArgumentException("Command parameters cannot be more than four characters"); } Command = command; Parameter = parameters.PadRight(ParamMaxLength); Television = television; }
public Form1() { InitializeComponent(); _television = new Television("127.0.0.1", 8080); }
public static AquosCommand Power(PowerSetting setting, Television television = null) { return(new AquosCommand("POWR", Convert.ToString((int)setting), television)); }
public static AquosCommand Volume(int value, Television television = null) { return(new AquosCommand("VOLM", Convert.ToString(value), television)); }
public static AquosCommand Volume(int value, Television television = null) { return new AquosCommand("VOLM", Convert.ToString(value), television); }
public static AquosCommand Power(PowerSetting setting, Television television = null) { return new AquosCommand("POWR", Convert.ToString((int)setting), television); }