Beispiel #1
0
 private void addSongButton_Click(object sender, EventArgs e)
 {
     using (var form = new AddItemDialog())
     {
         form.ShowDialog();
         if (form.resultType == AddItemDialog.RESULT_ARTIST)
         {
             spotControl.getBlockTable().addArtist(new Artist(form.artist));
             BlackListForm_Load(sender, e);
             MessageBox.Show(this, "Added artist successfully.", "SpotMute - Add");
         }
         else if (form.resultType == AddItemDialog.RESULT_SONG)
         {
             spotControl.getBlockTable().addSong(new Song(form.artist, form.song));
             BlackListForm_Load(sender, e);
             MessageBox.Show(this, "Added song successfully.", "SpotMute - Add");
         }
     }
 }
 private void addSongButton_Click(object sender, EventArgs e)
 {
     using (var form = new AddItemDialog())
     {
         form.ShowDialog();
         if (form.resultType == AddItemDialog.RESULT_ARTIST)
         {
             spotControl.getBlockTable().addArtist(new Artist(form.artist));
             BlackListForm_Load(sender, e);
             MessageBox.Show(this, "Added artist successfully.", "SpotMute - Add");
         }
         else if(form.resultType == AddItemDialog.RESULT_SONG)
         {
             spotControl.getBlockTable().addSong(new Song(form.artist, form.song));
             BlackListForm_Load(sender, e);
             MessageBox.Show(this, "Added song successfully.", "SpotMute - Add");
         }
     }
 }