// метод завантаження даних з файлу public void LoadData() { using (Stream stream = File.OpenRead(pathFile)) { var serializer = new BinaryFormatter(); Art art = (Art)serializer.Deserialize(stream); Copy(art.artists, arts.artists); Copy(art.pictures, arts.pictures); Copy(art.museums, arts.museums); Copy(art.auctions, arts.auctions); Copy(art.collectioners, arts.collectioners); Copy(art.comShops, arts.comShops); Copy(art.ownCollections, arts.ownCollections); } // метод копіювання Generic Lists void Copy <T>(List <T> from, List <T> to) { to.Clear(); to.AddRange(from); } }
public AddPictureForm() { art = new Art(); InitializeComponent(); }
public Dao(Art arts) { this.arts = arts; }
public AddArtistForm() { art = new Art(); InitializeComponent(); }
public AddMuseumForm() { art = new Art(); InitializeComponent(); }
public AddCollectionerForm() { art = new Art(); InitializeComponent(); }