Skip to content

Commit

Permalink
Fixes feedback for tags with space in name
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Johnson committed Mar 9, 2021
1 parent 4ca5f2d commit c738e7a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions QscQsysDspPlugin/QscDsp.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using Crestron.SimplSharp;
using Crestron.SimplSharp.Reflection;
using Crestron.SimplSharpPro.DeviceSupport;
Expand Down Expand Up @@ -405,9 +407,9 @@ void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args)
}
else if (args.Text.IndexOf("cv") > -1)
{
var changeMessage = args.Text.Split(null);
var changeMessage = Regex.Split(args.Text, " (?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)"); //Splits by space unless enclosed in double quotes using look ahead method: https://stackoverflow.com/questions/18893390/splitting-on-comma-outside-quotes

string changedInstance = changeMessage[1].Replace("\"", "");
string changedInstance = changeMessage[1];
Debug.Console(1, this, "cv parse Instance: {0}", changedInstance);
bool foundItFlag = false;
foreach (KeyValuePair<string, QscDspLevelControl> controlPoint in LevelControlPoints)
Expand All @@ -432,7 +434,6 @@ void Port_LineReceived(object dev, GenericCommMethodReceiveTextArgs args)
foreach (var dialer in Dialers)
{
PropertyInfo[] properties = dialer.Value.Tags.GetType().GetCType().GetProperties();
//GetPropertyValues(Tags);
foreach (var prop in properties)
{
var propValue = prop.GetValue(dialer.Value.Tags, null) as string;
Expand Down

0 comments on commit c738e7a

Please sign in to comment.