예제 #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!
 }
예제 #3
0
        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();
 }