private void editButton_Click(object sender, EventArgs e) { if (listBoxTesting.SelectedIndex == -1) { MessageBox.Show("Please select a song before trying to edit", "Incorrect input", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { AddSong test = new AddSong(false, (Song)listBoxTesting.SelectedItem, songBook, fileFunctions); test.ShowDialog(); titleLabel.Text = ""; songBody.Text = ""; } }
private void newSongToolStripMenuItem_Click(object sender, EventArgs e) { AddSong test = new AddSong(true, null, songBook, fileFunctions); test.ShowDialog(); }