Exemple #1
0
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e) //writing to xml file, if program is closing
        {
            WorkWithFiles w = new WorkWithFiles();

            w.writeSongsToFile(musicLibrary);
            w.writePlaylistsToFile(playlists);
        }
Exemple #2
0
        static void read() //read from file
        {
            WorkWithFiles w = new WorkWithFiles();

            w.readSongsFromFile();
            musicLibrary = w.ReadSongsCollection;
            w.readPlaylistsFromFile();
            playlists = w.ReadPlaylistsCollection;
        }