private void listBox_seq_DoubleClick(object sender, EventArgs e) { if (listBox_seq.SelectedItem != null) { ElfBase elf = listBox_seq.SelectedItem as ElfBase; elf.GetSettingForm().ShowDialog(); } }
private void tool_delTool_Click(object sender, EventArgs e) { if (listBox_seq.SelectedItem != null) { ElfBase elf = listBox_seq.SelectedItem as ElfBase; elfList.Remove(elf); } }
private void tool_moveDownTool_Click(object sender, EventArgs e) { if (listBox_seq.SelectedItem != null) { ElfBase elf = listBox_seq.SelectedItem as ElfBase; int index = elfList.IndexOf(elf); if (index >= elfList.Count - 1) { return; } elfList.Remove(elf); elfList.Insert(index + 1, elf); listBox_seq.SelectedItem = elf; } }