private void RegexSearch(string line) { Dictionary <string, KeyValuePair <string, bool> > res = RegexParser.RegexSearch(line); if (res.TryGetValue("NameText", out KeyValuePair <string, bool> nameText)) { NameText.Text = MakeLineBeautiful(nameText.Key); } if (res.TryGetValue("RecognizedMainText", out KeyValuePair <string, bool> mainText)) { RecognizedMainText.Text = MakeLineBeautiful(mainText.Key); } if (res.TryGetValue("DocNumberText", out KeyValuePair <string, bool> docNum)) { DocNumberText.Text = MakeLineBeautiful(docNum.Key); } if (res.TryGetValue("DocNumberDate", out KeyValuePair <string, bool> docDate)) { DocNumberDate.Text = MakeLineBeautiful(docDate.Key); } if (res.TryGetValue("ApplicantText", out KeyValuePair <string, bool> appName)) { ApplicantText.Text = MakeLineBeautiful(appName.Key); } if (res.TryGetValue("INNumberText", out KeyValuePair <string, bool> intext)) { INNumberText.Text = MakeLineBeautiful(intext.Key); } if (res.TryGetValue("INNumberDate", out KeyValuePair <string, bool> indate)) { INNumberDate.Text = MakeLineBeautiful(indate.Key); } if (res.TryGetValue("InventionText", out KeyValuePair <string, bool> invention)) { InventionText.Text = MakeLineBeautiful(invention.Key); } }