Ejemplo n.º 1
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         if (Rater.SongsRatingsUpdated)
         {
             var dr = MessageBox.Show("Do you want to save your unsaved rating changes?", "Confirmation", MessageBoxButtons.YesNoCancel);
             if (dr == DialogResult.Yes)
             {
                 Rater.SaveSongRatings();
             }
             else if (dr == DialogResult.Cancel)
             {
                 e.Cancel = true;
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void SaveRatings()
 {
     Rater.SaveSongRatings();
     Rater.SongsRatingsUpdated = false;
     DisplayResponseMessage("Saved!");
 }