public void AddBotSystem(BotSystem botSystem) { lock (botSystems) botSystems.Add(botSystem.GetType().ToString(), botSystem); Program.form1.Invoke(new Action(() => { Program.form1.checkedListBox_BotSystems.Items.Add(botSystem); botSystem.id = Program.form1.checkedListBox_BotSystems.Items.Count - 1; Program.form1.checkedListBox_BotSystems.SetItemChecked(botSystem.id, botSystem.enabled); })); }
public void RemoveBotSystem(BotSystem botSystem) { lock (botSystems) botSystems.Remove(botSystem.GetType().ToString()); }