コード例 #1
0
ファイル: JukeboxForm.cs プロジェクト: fabestine1/MyThing
        private void BtnPlay_Click(object sender, EventArgs e)
        {
            // todo: assignment 4
            Song selectedSong = (Song)lbSongs.SelectedItem;

            listOfPlayedSongs.RegisterPlayed(selectedSong);
        }
コード例 #2
0
        private void BtnPlay_Click(object sender, EventArgs e)
        {
            // todo: assignment 4
            Song selectedSong = (Song)lbSongs.SelectedItem;

            if (selectedSong != null)
            {
                lLOfPlayedSongs.RegisterPlayed(selectedSong);
            }
            else
            {
                MessageBox.Show("Please select a song from the list first!");
            }
        }