private async void _bgWorker_ProgressChanged(object sender, ProgressChangedEventArgs e) { var si = listBox2.SelectedItem; listBox2.DataSource = await rController.GetAllNames(); if (si != null && listBox2.Items.Contains(si)) { listBox2.SelectedItem = si; } var array = Logger.Instance._buffer.ToArray(); listBox3.DataSource = array; listBox3.SelectedIndex = array.Length - 1; }
public RemoveRobot(BotController rController) { InitializeComponent(); this.rController = rController; comboBox1.DataSource = rController.GetAllNames().GetAwaiter().GetResult(); }