private void buttonAddEffect_Click(object sender, EventArgs e) { EffectSelectorForm effectSelectorForm = new EffectSelectorForm(Effects); if (effectSelectorForm.ShowDialog(this) == DialogResult.OK) { // create a new instance of the selected effect as we may want multiple copies of one effect Effect effect = (Effect)Activator.CreateInstance(effectSelectorForm.SelectedEffect.GetType()); audioGraph.AddEffect(effect); int index = checkedListBox1.Items.Add(effect, true); checkedListBox1.SelectedIndex = index; } //MessageBox.Show(String.Format("I have {0} effects", Effects.Count)); }