Пример #1
0
        private string GetIp(string id)
        {
            Match match = DEVICE_UNIQUE_ID_REGEX.Match(id);

            if (match.Success)
            {
                return(" " + match.Groups[2].Value);
            }
            else
            {
                return("");
            }
        }
Пример #2
0
        private void SetDisplayName(string id)
        {
            Match match = DEVICE_UNIQUE_ID_REGEX.Match(id);

            if (match.Success)
            {
                DisplayName = "ST-Link / USB " + match.Groups[1].Value;
            }
            else
            {
                DisplayName = $"Invalid device: {id}";
            }
        }