private void btn_Add_Click(object sender, EventArgs e) { DmxFramework.Midi.Action.Action NewAction = null; if (this.cmb_AddAction.SelectedIndex == 0) { NewAction = new ChangeDmxValue(); } else if (this.cmb_AddAction.SelectedIndex == 1) { NewAction = new SceneMidiPlayer(); } else if (this.cmb_AddAction.SelectedIndex == 2) { NewAction = new AutoSpeed(); } else if (this.cmb_AddAction.SelectedIndex == 3) { NewAction = new AutoPress(); } else if (this.cmb_AddAction.SelectedIndex == 4) { NewAction = new SceneSpeed(); } if (NewAction != null) { mAction.Actions.Add(NewAction); this.list_Action.Items.Add(NewAction); } }
private void btn_uRemoveSelected_Click(object sender, EventArgs e) { DmxFramework.Midi.Action.Action act = this.list_Action.SelectedItem as DmxFramework.Midi.Action.Action; if (act == null) { return; } mAction.Actions.Remove(act); this.list_Action.Items.Remove(act); ResetPanel(); }