public bool SetInputPort(InputPort inputPort) { //Build playing content uri //Example of playing content uri //extInput:hdmi?port=1 Match match = Regex.Match(inputPort.ToString(), @"^(.+)([0-9]+)$"); if (match.Success) { string portType = match.Groups[1].Value.ToLower(); string portId = match.Groups[2].Value; string uri = $@"extInput:{portType}?port={portId}"; var parameters = new JArray( new JObject( new JProperty("uri", uri) ) ); var result = CallMethod("setPlayContent", "sony/avContent", parameters); return(ResultIsSuccessful(result)); } return(false); }
public void Show(InputPort port, DeviceType deviceType, MotorMovementTypes movementType, int degreeMovement, int powerRatingMovement, int timeToMoveInSeconds) { PortName.Text = port.ToString(); ObjectName.Text = deviceType.ToString(); MovementStyle.SelectedIndex = (int) movementType; DegreeSlider.Value = degreeMovement; PowerTimerSlider.Value = timeToMoveInSeconds; PowerSlider.Value = powerRatingMovement; Visibility = Visibility.Visible; }
public void Show(InputPort port, DeviceType deviceType, MotorMovementTypes movementType, int degreeMovement, int powerRatingMovement, int timeToMoveInSeconds) { PortName.Text = port.ToString(); ObjectName.Text = deviceType.ToString(); MovementStyle.SelectedIndex = (int)movementType; DegreeSlider.Value = degreeMovement; PowerTimerSlider.Value = timeToMoveInSeconds; PowerSlider.Value = powerRatingMovement; Visibility = Visibility.Visible; }
public string send() { string toSend = InputPort.ToString() + " " + InputLabel.ToString() + " " + OutputPort.ToString() + " "; foreach (int label in OutputLabel) { toSend += label + ","; } toSend = toSend.Remove(toSend.Length - 1, 1); toSend += " " + Index; return(toSend); }
public void Show(InputPort port, DeviceType deviceType, byte sensorMode) { _sensorType = GetTypeFromSensorType(deviceType); BindData(_sensorType); if (_sensorType != null) SensorStyle.SelectedItem = Enum.ToObject(_sensorType, sensorMode); PortName.Text = port.ToString(); ObjectName.Text = deviceType.ToString(); Visibility = Visibility.Visible; }
public void Show(InputPort port, DeviceType deviceType, byte sensorMode) { _sensorType = GetTypeFromSensorType(deviceType); BindData(_sensorType); if (_sensorType != null) { SensorStyle.SelectedItem = Enum.ToObject(_sensorType, sensorMode); } PortName.Text = port.ToString(); ObjectName.Text = deviceType.ToString(); Visibility = Visibility.Visible; }