private void frmMain_Load(object sender, EventArgs e) { try { _ArtistList = clsArtistList.RetrieveArtistList(); } catch (Exception ex) { MessageBox.Show(ex.Message, "File retrieve error"); } updateDisplay(); }
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); }
public clsArtist(clsArtistList prArtistList) { _WorksList = new clsWorksList(); _ArtistList = prArtistList; EditDetails(); }