Example #1
0
 private void addButton_Click(object sender, EventArgs e)
 {
     try
     {
         ArtistForm.Run(new Artist(_artistList));
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error adding new artist");
     }
 }
Example #2
0
        public static void Run(Artist artist)
        {
            ArtistForm artistForm;

            if (!_artistFormList.TryGetValue(artist, out artistForm))
            {
                artistForm = new ArtistForm();
                _artistFormList.Add(artist, artistForm);
                artistForm.SetDetails(artist);
            }
            else
            {
                artistForm.Show();
                artistForm.Activate();
            }
        }
Example #3
0
        private void artistList_DoubleClick(object sender, EventArgs e)
        {
            string key;

            key = Convert.ToString(artistList.SelectedItem);
            if (key != null)
            {
                try
                {
                    ArtistForm.Run(_artistList[key]);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "This should never occur");
                }
            }
        }