private void frmMain_Load(object sender, EventArgs e) { try { _ArtistList = clsBrandList.RetrieveArtistList(); } catch (Exception ex) { MessageBox.Show(ex.Message, "File retrieve error"); } UpdateDisplay(); GalleryNameChanged += new Notify(updateTitle); GalleryNameChanged(_ArtistList.GalleryName); //updateTitle(_ArtistList.GalleryName); }
public static clsBrandList RetrieveArtistList() { clsBrandList lcArtistList; try { System.IO.FileStream lcFileStream = new System.IO.FileStream(_FileName, System.IO.FileMode.Open); BinaryFormatter lcFormatter = new BinaryFormatter(); lcArtistList = (clsBrandList)lcFormatter.Deserialize(lcFileStream); lcFileStream.Close(); } catch (Exception ex) { lcArtistList = new clsBrandList(); throw new Exception("File Retrieve Error: " + ex.Message); } return(lcArtistList); }
public clsBrand(clsBrandList prArtistList) { _WorksList = new clsVehicleList(); _ArtistList = prArtistList; }