예제 #1
0
        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));
        }
예제 #2
0
파일: MainForm.cs 프로젝트: Jiyuu/SkypeFX
 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));
 }