private void selectButton_Click(object sender, EventArgs e) { if (songLists.SelectedIndex == -1) { MessageBox.Show("Please select a song list", "Incorrect input", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else if (project) { Songlist currSongList = (Songlist)songLists.SelectedItem; int[] songs = currSongList.songListArray; for (var i = 0; i < songs.Length; i++) { Cursor.Show(); Song song = songBook.allMySongs[songs[i]]; ProjectSong project = new ProjectSong(song, songBook.fontSize); MessageBox.Show(song.songNum + "# " + song.title, "Song list: " + currSongList.listName, MessageBoxButtons.OK); Cursor.Hide(); project.ShowDialog(); } } else { DialogResult = DialogResult.OK; listToEdit = (Songlist)songLists.SelectedItem; Close(); } }
private void testProject_Click(object sender, EventArgs e) { if (listBoxTesting.SelectedIndex == -1) { MessageBox.Show("Please select a song before trying to project", "Incorrect input", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { Song testsong = (Song)listBoxTesting.SelectedItem; testsong.GetSongBody(); ProjectSong test = new ProjectSong(testsong, songBook.fontSize); test.setText(); Cursor.Hide(); test.ShowDialog(); } }