Example #1
0
        private void ThreadSafeAddItemToLog(ListBox listBox, object value)
        {
            listBox.UIThread(delegate
                                 {
                                     listBox.Items.Add(value);

                                     // scroll to last item
                                     listBox.SelectedIndex = listBox.Items.Count - 1;
                                 });
        }