Ejemplo n.º 1
0
        //EventHandler for proper button click

        private void addSingleToolStripMenuItem_Click(object sender, EventArgs e)
        {
            AddEditForm dialogForm = new AddEditForm(null);

            if (dialogForm.ShowDialog() == DialogResult.OK)
            {
                addSingleToModel(dialogForm.SingleTitle, dialogForm.SingleAuthor, dialogForm.SingleTrackDate, dialogForm.SingleStyle);
                OnActivated(EventArgs.Empty);
            }
        }
Ejemplo n.º 2
0
 private void editSingleToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (singlesListView.SelectedItems.Count == 1)
     {
         MusicSingle single     = (MusicSingle)singlesListView.SelectedItems[0].Tag;
         AddEditForm dialogForm = new AddEditForm(single);
         if (dialogForm.ShowDialog() == DialogResult.OK)
         {
             editSingleInModel(single, dialogForm.SingleTitle, dialogForm.SingleAuthor,
                               dialogForm.SingleTrackDate, dialogForm.SingleStyle);
             OnActivated(EventArgs.Empty);
         }
     }
 }