From 8e2ddff8efb1b10be53d5d6fd0d6d5ef3372c966 Mon Sep 17 00:00:00 2001 From: Edward Wright Date: Wed, 12 Jun 2019 11:55:21 -0400 Subject: [PATCH] clean up display of unknown pid/vid --- SimplySerial/SimplySerial.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/SimplySerial/SimplySerial.cs b/SimplySerial/SimplySerial.cs index 62d490f..db35230 100644 --- a/SimplySerial/SimplySerial.cs +++ b/SimplySerial/SimplySerial.cs @@ -511,7 +511,7 @@ namespace SimplySerial c.vid = c.vid.Substring(0, Math.Min(4, c.vid.Length)); } else - c.vid = "????"; + c.vid = "----"; if (mPID.Success) { @@ -519,7 +519,7 @@ namespace SimplySerial c.pid = c.pid.Substring(0, Math.Min(4, c.vid.Length)); } else - c.pid = "????"; + c.pid = "----"; Match mName = Regex.Match(c.name, namePattern); if (mName.Success) @@ -527,11 +527,11 @@ namespace SimplySerial c.name = mName.Value; c.num = int.Parse(c.name.Substring(3)); if (c.num == 0) - c.name = "????"; + c.name = "?"; } else { - c.name = "????"; + c.name = "?"; c.num = 0; } @@ -542,7 +542,7 @@ namespace SimplySerial }).ToList(); // remove all unusable ports from the list - detectedPorts.RemoveAll(p => p.name == "????"); + detectedPorts.RemoveAll(p => p.name == "?"); return (detectedPorts); }