void SetSubtitleStreamIndex(object sender, CommandEventArgs args) { _logger.Debug("SetSubtitleStreamIndex {0}", args); int index; if (args == null) { throw new ArgumentException("SetSubtitleStreamIndex: expecting a single integer argurment for SubtitleStreamIndex"); } try { index = Convert.ToInt32(args); } catch (FormatException) { throw new ArgumentException("SetSubtitleStreamIndex: Invalid format, expecting a single integer argurment for SubtitleStreamIndex"); } _playbackManager.SetSubtitleStreamIndex(index); }
void socket_SetSubtitleStreamIndexCommand(object sender, GenericEventArgs <int> e) { _playbackManager.SetSubtitleStreamIndex(e.Argument); }