diff --git a/ComponentsLibrary/ListBoxValues.cs b/ComponentsLibrary/ListBoxValues.cs index 3c1e566..9013e81 100644 --- a/ComponentsLibrary/ListBoxValues.cs +++ b/ComponentsLibrary/ListBoxValues.cs @@ -80,6 +80,7 @@ namespace ComponentsLibrary PropertyInfo[] properties = typeof(T).GetProperties(); string layout = layoutString; string pattern = @"^(.*?){T}.*?(.*?){P}"; + //string input2 = "Температура воздуха ТЕМПЕРАТУРА ВЫСОКАЯ, давление НИЗКОЕ"; string? selectedString = item?.ToString(); @@ -102,15 +103,15 @@ namespace ComponentsLibrary staticText[i] = match.Groups[i+1].Value; } - //string pattern2 = $@"{beforeT}(.*?)\{beforeP}(.*)"; - //"Температура воздуха (.*?)\\, давление (.*)" + //string pattern2 = $@"{beforeT}(.*?)\{beforeP}(.*)\{beforeEnd}"; + //"Температура воздуха (.*?)\\, давление (.*)\\, такие дела" string patternStatic = $@""; for (int i = 0; i < staticText.Length; i++) { if (i == staticText.Length - 1) { - patternStatic += $"{staticText[i]}(.*?)"; + patternStatic += $"{staticText[i]}(.*)"; } else { patternStatic += $"{staticText[i]}(.*?)\\"; diff --git a/ComponentsView/FormComponents.cs b/ComponentsView/FormComponents.cs index b88350d..70e7097 100644 --- a/ComponentsView/FormComponents.cs +++ b/ComponentsView/FormComponents.cs @@ -60,7 +60,7 @@ namespace ComponentsLab private void listBoxValues_Load(object sender, EventArgs e) { - listBoxValues.SetLayout(" {prop1}, {prop2}, ", '{', '}'); + listBoxValues.SetLayout(" {T}, {P}", '{', '}'); var objectList = new List { new ObjectClass { T = " ", P = "1008" },