private void UpdateUI(string currentStatus, bool newLine) { if (newLine) { lstLog.Items.Add(currentStatus); } else { lstLog.Items[lstLog.Items.Count - 1] = currentStatus; } lstLog.SelectedIndex = lstLog.Items.Count - 1; Application.DoEvents(); }