示例#1
0
 private void frmMain_Load(object sender, EventArgs e)
 {
     try
     {
         _ArtistList = clsArtistList.RetrieveArtistList();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "File retrieve error");
     }
     updateDisplay();
 }
示例#2
0
 private void frmMain_Load(object sender, EventArgs e)
 {
     try
     {
         _ArtistList = clsArtistList.RetrieveArtistList();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "File retrieve error");
     }
     updateDisplay();
     GalleryNameChanged += new Notify(updateTitle);
     GalleryNameChanged(_ArtistList.GalleryName); // event raising!
 }
        public static clsArtistList RetrieveArtistList()
        {
            clsArtistList lcArtistList;

            try
            {
                System.IO.FileStream lcFileStream = new System.IO.FileStream(_FileName, System.IO.FileMode.Open);
                BinaryFormatter      lcFormatter  = new BinaryFormatter();
                lcArtistList = (clsArtistList)lcFormatter.Deserialize(lcFileStream);
                lcFileStream.Close();
            }
            catch (Exception ex)
            {
                lcArtistList = new clsArtistList();
                throw new Exception("File Retrieve Error: " + ex.Message);
            }
            return(lcArtistList);
        }
示例#4
0
 public clsArtist(clsArtistList prArtistList)
 {
     _WorksList  = new clsWorksList();
     _ArtistList = prArtistList;
     EditDetails();
 }