Beispiel #1
0
 private void MainForm_Load(object sender, EventArgs e)
 {
     try
     {
         _artistList = ArtistList.RetrieveArtistList();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "File retrieve error");
     }
     UpdateDisplay();
     GalleryNameChanged += UpdateTitle;
     GalleryNameChanged(_artistList.GalleryName);
 }
Beispiel #2
0
        public static ArtistList RetrieveArtistList()
        {
            ArtistList artistList;

            try
            {
                System.IO.FileStream fileStream = new System.IO.FileStream(_fileName, System.IO.FileMode.Open);
                BinaryFormatter      formatter  = new BinaryFormatter();
                artistList = (ArtistList)formatter.Deserialize(fileStream);
                fileStream.Close();
            }
            catch (Exception ex)
            {
                artistList = new ArtistList();
                throw new Exception("File Retrieve Error: " + ex.Message);
            }
            finally
            {
            }
            return(artistList);
        }
Beispiel #3
0
 public Artist(ArtistList artistList)
 {
     _workList   = new WorkList();
     _artistList = artistList;
 }