From 103dc552e0a894159076ca4f0ad0d52eb426c6a9 Mon Sep 17 00:00:00 2001 From: revengel66 Date: Tue, 1 Oct 2024 14:39:15 +0300 Subject: [PATCH] =?UTF-8?q?back=20(=D0=B4=D0=BE=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D0=B0=D1=82=D1=8C=20=D1=82=D0=BE,=20=D1=87=D1=82=D0=BE?= =?UTF-8?q?=20=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=BD=D0=BE=D0=B9=20?= =?UTF-8?q?=D1=81=D1=82=D1=80=D0=BE=D0=BA=D0=B5=20=D1=83=20=D0=BD=D0=B0?= =?UTF-8?q?=D1=81=20=D0=BC=D0=BE=D0=B6=D0=B5=D1=82=20=D1=83=D0=BA=D0=B0?= =?UTF-8?q?=D0=B7=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=D1=81=D1=8F=20=D0=BD=D0=B5?= =?UTF-8?q?=20=D1=82=D0=BE=D0=BB=D1=8C=D0=BA=D0=BE=20T=20=D0=B8=20P,=20?= =?UTF-8?q?=D0=B0=20=D0=B8=20=D0=B4=D1=80=D1=83=D0=B3=D0=B8=D0=B5=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D1=8B=D0=B5=20=D0=B7=D0=BD?= =?UTF-8?q?=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20{},=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=8D=D1=82=D0=BE=D0=B3=D0=BE=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B4=D0=BE=20=D1=87=D0=B5=D1=80=D0=B5=D0=B7=20=D1=80=D0=B5?= =?UTF-8?q?=D0=B3=D1=91=D0=BB=D1=8F=D1=80=D0=BD=D1=8B=D0=B5=20=D0=B2=D1=8B?= =?UTF-8?q?=D1=80=D0=B0=D0=B6=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B4=D0=BE=D1=81?= =?UTF-8?q?=D1=82=D0=B0=D1=82=D1=8C=20=D1=8D=D1=82=D0=B8=20=D0=B7=D0=BD?= =?UTF-8?q?=D0=B0=D1=87=D0=B5=D0=BD=D0=B8=D1=8F,=20=D0=BE=D0=BF=D0=B8?= =?UTF-8?q?=D1=80=D0=B0=D1=8F=D1=81=D1=8C=20=D0=BD=D0=B0=20=D1=88=D0=B0?= =?UTF-8?q?=D0=B1=D0=BB=D0=BE=D0=BD=D0=BD=D1=83=D1=8E=20=D1=81=D1=82=D1=80?= =?UTF-8?q?=D0=BE=D0=BA=D1=83=20=D0=B8=20=D0=B7=D0=B0=D0=BA=D0=B8=D0=BD?= =?UTF-8?q?=D1=83=D1=82=D1=8C=20=D0=B2=20=D0=BC=D0=B0=D1=81=D1=81=D0=B8?= =?UTF-8?q?=D0=B2)=20=D0=B2=D0=B5=D1=80=D0=BE=D1=8F=D1=82=D0=BD=D0=BE,=20?= =?UTF-8?q?=D0=B2=D1=8B=D0=BD=D0=B5=D1=81=D1=82=D0=B8=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D1=86=D0=B8=D0=BA=D0=BB=D1=8B=20=D1=81=20regex=20=D0=B8=20m?= =?UTF-8?q?utch=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD?= =?UTF-8?q?=D1=83=D1=8E=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E,=20?= =?UTF-8?q?=D1=82=D0=B0=D0=BA=20=D0=BA=D0=B0=D0=BA=20=D0=BE=D0=BD=D0=B8=20?= =?UTF-8?q?=D0=B8=D0=BD=D0=B4=D0=B5=D0=BD=D1=82=D0=B8=D1=87=D0=BD=D0=BE=20?= =?UTF-8?q?=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D1=8E=D1=82.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ComponentsLibrary/ListBoxValues.cs | 7 ++++--- ComponentsView/FormComponents.cs | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) 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" },