private void AddResultToList(ThreadResultArgs eventResultArgs)
        {
            eventResultArgs.Brush = eventResultArgs.Result <= value ? greenBrush : redBrush;

            results.Add(eventResultArgs);
            resultsList.Items.MoveCurrentToLast();
            resultsList.ScrollIntoView(resultsList.Items.CurrentItem);
        }
 private void OnThredsReturn(object sender, ThreadResultArgs eventResultArgs)
 {
     UiInvoke(() =>
     {
         if (eventResultArgs.Result == value && !found)
         {
             found = true;
             Stop();
             AddResultToList(eventResultArgs);
             MessageBox.Show(eventResultArgs.Name + " нашёл значение", "Найдено!");
         }
         if (!found) AddResultToList(eventResultArgs);
     });
 }