Beispiel #1
0
 public void addMemento(PlaylistMemento memento, Playlist playlist)
 {
     if (!playlists.Contains(playlist))
     {
         playlists.Add(playlist);
         mementos.Add(new List <PlaylistMemento>());
         mementos[mementos.Count - 1].Add(memento);
     }
     else
     {
         if (mementos[playlists.IndexOf(playlist)].Count == 0)
         {
             mementos.Add(new List <PlaylistMemento>());
         }
         mementos[playlists.IndexOf(playlist)].Add(memento);
     }
 }
Beispiel #2
0
 public void setMemento(PlaylistMemento memento)
 {
     this.PlaylistName = memento.name;
     this.SongList     = memento.songs;
 }