From bc0d2385f7a3c8333ddc06aad7e677696f1408bd Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Mon, 16 May 2022 15:50:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B8=D0=BD=D1=82=D0=B5=D0=B3=D1=80=D0=B8?= =?UTF-8?q?=D1=80=D1=83=D0=B5=D1=82=20=D0=B0=D0=BB=D0=B3=D0=BE=D1=80=D0=B8?= =?UTF-8?q?=D1=82=D0=BC=20=D0=B2=20=D0=BE=D0=B1=D1=80=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D1=82=D1=87=D0=B8=D0=BA=20=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainForm.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/MainForm.cs b/MainForm.cs index dcf9355..0397f71 100644 --- a/MainForm.cs +++ b/MainForm.cs @@ -19,6 +19,19 @@ namespace AwesomeEmailExtractor private void executeButton_Click(object sender, EventArgs e) { + // Объявляем список уникальных e-mail-ов + List uniqueEmails = new List(); + + // Получаем исходный текст из sourceRichTextBox + string sourceText = sourceRichTextBox.Text; + + // Вызываем метод для извлечения e-mail-ов + int count = ExtactEmailsAlgorithm.Extract(sourceText, out uniqueEmails); + + // Выводим результат + toolStripStatusLabel.Text = "Успех!"; + label1.Text = $"Количество e-mail-ов в тексте: {count}"; + uniqueListBox.DataSource = uniqueEmails; } } }